save.php
资源名称:minierp.rar [点击查看]
上传用户:yantgcom
上传日期:2013-07-19
资源大小:478k
文件大小:1k
源码类别:
MySQL数据库
开发平台:
PHP
- <?php
- include("kuchen.php");
- $t_AUTOID=$_GET[x_AUTOID];
- if (empty($t_AUTOID)){$t_AUTOID=0;};
- $t_KUCID =$_GET[x_KUCID];
- $t_KUC01 =$_GET[x_KUC01];
- $t_KUC02 =$_GET[x_KUC02];
- $t_KUC03 =$_GET[x_KUC03];
- $t_KUC04 =$_GET[x_KUC04];
- $t_KUC05 =$_GET[x_KUC05];
- $t_KUC03 = " 鏄庡織 "; // 璇曠敤
- include ("../inc/db.php");
- include ("../inc/phpmkrfn.php");
- // $p_id= $t_KUC01;
- // $p_sn= $t_KUC05;
- // $p_ph= $t_KUC04;
- // $p_num=$t_KUC02;
- // $E_MESSAGE=updatekuchen($p_id,$p_sn,$p_ph,0 - $p_num,$t_KUCID);
- // echo $E_MESSAGE;
- // exit;
- $conn = phpmkr_db_connect(HOST, USER, PASS, DB, PORT);
- $m_tablename="kuchen";
- $sSql = "select * from $m_tablename where autoid =$t_AUTOID";
- $rs = phpmkr_query($sSql,$conn) or die("Failed to execute query: " . phpmkr_error() . '<br>SQL: ' . $sSql);
- $FIELDSTR .=" KUCID ='$t_KUCID',";
- $FIELDSTR .=" KUC01 ='$t_KUC01',"; //浜у搧浠g爜
- $FIELDSTR .=" KUC02 ='$t_KUC02',";
- $FIELDSTR .=" KUC03 ='$t_KUC03',";
- $FIELDSTR .=" KUC04 ='$t_KUC04',";
- $FIELDSTR .=" KUC05 ='$t_KUC05',";
- $FIELDSTR .=" dt999 = now() ";
- if (phpmkr_num_rows($rs) > 0){
- $uSql = "update $m_tablename set ";
- $uSql .= $FIELDSTR;
- $uSql .= " where autoid =$t_AUTOID";
- }
- else
- {
- $uSql = "INSERT INTO $m_tablename set ";
- $uSql .= $FIELDSTR;
- }
- $rs = phpmkr_query($uSql,$conn) or die("Failed to execute query: " . phpmkr_error() . '<br>SQL: ' . $uSql);
- //echo $uSql;
- header("location:listdelt.php?KUCID=$t_KUC01");
- ?>