本文整理汇总了PHP中updateDataIntoTable函数的典型用法代码示例。如果您正苦于以下问题:PHP updateDataIntoTable函数的具体用法?PHP updateDataIntoTable怎么用?PHP updateDataIntoTable使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了updateDataIntoTable函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$Message = "Error While Adding Or Updating.";
echo "<script>alert('Department or Machine or Machine Not Selected.Please Select It!!!');location.href='elec_add_machine_maint.php?Message={$Message}';</script>";
} else {
if ($PageKeyValue == "") {
$tableName = "elec_machine_maint";
$tableData = array("''", "'{$machine_maint_date}'", "'{$department_id}'", "'{$machine_id}'", "'{$details}'", "now()");
addDataIntoTable($tableName, $tableData);
//print_r($tableData);
$Message = "{$PageFor} Inserted";
redirect("{$Page}?Message={$Message}");
} else {
if ($mode == "edit") {
$tableName = "elec_machine_maint";
$tableColumns = array("machine_maint_id", "machine_maint_date", "department_id", "machine_id", "details");
$tableData = array("'{$PageKeyValue}'", "'{$machine_maint_date}'", "'{$department_id}'", "'{$machine_id}'", "'{$details}'");
updateDataIntoTable($tableName, $tableColumns, $tableData);
$Message = "{$PageFor} Updated";
redirect("elec_list_machine_maint.php?Message={$Message}");
}
}
}
}
if (isset($_GET[$PageKey])) {
$sql = "select * from elec_machine_maint where {$PageKey} = '" . $_GET[$PageKey] . "'";
$result = mysql_query($sql) or die("Invalid query : " . $sql . "<br>" . mysql_errno() . " : " . mysql_error());
if (mysql_num_rows($result) > 0) {
$row = mysql_fetch_array($result);
$PageKeyValue = $row[$PageKey];
$machine_maint_date = getDateFormate($row["machine_maint_date"]);
$details = $row["details"];
$department_id = $row['department_id'];
示例2: die
$item_id=$_POST['item_id'][$i];
$po_qty=$_POST['po_qty'][$i];
$pend_qty=$_POST['pend_qty'][$i];
$rate=$_POST['rate'][$i];
$disc_perc=$_POST['disc_perc'][$i];
$duty_perc=$_POST['duty_perc'][$i];
$ecess_perc=$_POST['ecess_perc'][$i];
$vat_perc=$_POST['vat_perc'][$i];
$net_rate=$_POST['net_rate'][$i];
///////////////////////////////// Pending Quantity ///////////////////////
$sql_upd="update ms_indent_transaction set pend_qty=$pend_qty where indent_transaction_id=$indent_trans_id";
mysql_query ($sql_upd) or die (mysql_error());
///////////////////////////////// End ///////////////////////
$tableColumns=array("order_transaction_id","order_id","indent_transaction_id","item_id","po_qty","pend_qty","rate","disc_perc","duty_perc","ecess_perc","vat_perc","net_rate");
$tableData=array("'$order_trans_id'","'$PageKeyValue'","'$indent_trans_id'","'$item_id'","'$po_qty'","'$po_qty'","'$rate'","'$disc_perc'","'$duty_perc'","'$ecess_perc'","'$vat_perc'","'$net_rate'");
if(updateDataIntoTable("ms_order_transaction",$tableColumns,$tableData))
$Message = "$PageFor Updated";
}
}
//redirect("store_list_purchase_order.php?Message=$Message");
}
}
}
if(isset($_GET["order_id"]))
{
$order_id = $_GET["order_id"];
}
else
{
$sql="select max(order_id) as order_id from ms_order_master";
示例3:
{
if($_POST['item_name'][$i]!='')
{
$RGP_trans_id=$_POST['RGP_trans_id'][$i];
$item_name=addslashes($_POST['item_name'][$i]);
$department_id=$_POST['department_id'][$i];
$uom_id=$_POST['uom_id'][$i];
$remarks=$_POST['remarks'][$i];
$quantity=$_POST['quantity'][$i];
$pend_qty=$_POST['quantity'][$i];
$rate=$_POST['rate'][$i];
if($RGP_trans_id!="")
{
$tableData=array("'$RGP_trans_id'","'$PageKeyValue'","'$department_id'","'$item_name'","'$uom_id'","'$remarks'","'$quantity'","'$pend_qty'","'$rate'");
//print_r($tableData);echo "<br />";
updateDataIntoTable("ms_RGP_transaction",$tableColumns,$tableData);
}
else
{
$tableData=array("''","'$PageKeyValue'","'$department_id'","'$item_name'","'$uom_id'","'$remarks'","'$quantity'","'$pend_qty'","'$rate'","now()");
addDataIntoTable("ms_RGP_transaction",$tableData);
}
}
}
$Message = "$PageFor Updated";
redirect("store_list_RGP.php?Message=$Message");
}
}
}
}
示例4:
}
else
{
//$machine_transaction_id.'<br />';
$tableData=array("''","'$PageKeyValue'","'$service_id'","'$maint_date'","'$sch_date'","now()");
//print_r($tableData);
$tableColumns=array("machine_transaction_id","machine_id","service_id","maint_date","schedule_date");
$tableData=array("'$machine_transaction_id'","'$machine_code'","'$service_id'","'$maint_date'","'$sch_date'");
updateDataIntoTable($tableName,$tableColumns,$tableData);
$job_id=$_POST['job_id'][$i];
$tableColumns=array("job_id","service_id","machine_id","schedule_date","maint_date");
//echo $jc." : ".$service_id." : ".$PageKeyValue." : ".$sch_date." : ".$maint_date."<br>";;
$tableDataJob=array("'$job_id'","'$service_id'","'$machine_code'","'$sch_date'","'$maint_date'");
updateDataIntoTable("maint_job",$tableColumns,$tableDataJob);
}
$Message = "$PageFor Updated";
}
}
$Message = "$PageFor Updated";
//redirect("maint_list_machines.php?Message=$Message");
}
}
}
?>
<?
if(isset($_GET["Message"]))
{
$Message = $_GET["Message"];
}