• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP updateDataIntoTable函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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'];
开发者ID:ViShNuPrAtap,项目名称:lss,代码行数:31,代码来源:elec_add_machine_maint.php


示例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";
开发者ID:shailendra999,项目名称:hr_admin,代码行数:31,代码来源:store_add_purchase_order.php


示例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");
			}
		}	
	}	
}
开发者ID:shailendra999,项目名称:hr_admin,代码行数:30,代码来源:store_add_RGP.php


示例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"];
}
开发者ID:shailendra999,项目名称:hr_admin,代码行数:31,代码来源:maint_add_machines.php



注:本文中的updateDataIntoTable函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP updateDate函数代码示例发布时间:2022-05-23
下一篇:
PHP updateData函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap