opersave.php
资源名称:minierp.rar [点击查看]
上传用户:yantgcom
上传日期:2013-07-19
资源大小:478k
文件大小:1k
源码类别:
MySQL数据库
开发平台:
PHP
- <?php
- include ("../inc/db.php");
- include ("../inc/phpmkrfn.php");
- include ("kuchen.php");
- $t_AUTOID=$_GET['x_AUTOID'];
- if (empty($t_AUTOID)){$t_AUTOID=-1;};
- $conn = phpmkr_db_connect(HOST, USER, PASS, DB, PORT);
- $sSql ="select kuchen.*,ID,PROD01,PROD04,PROD05 from kuchen LEFT JOIN products ON kuchen.KUC01 = products.ID where kuchen.AUTOID='$t_AUTOID' ";
- $rs = phpmkr_query($sSql,$conn) or die("Failed to execute query: " . phpmkr_error() . '<br>SQL: ' . $sSql);
- $row = mysql_fetch_array($rs, MYSQL_ASSOC);
- $o_Num =$row[KUC02];
- $t_KUCID=$row[KUCID];
- $t_KUC01=$row[KUC01];
- $t_KUC02=$row[KUC02];
- $t_KUC03=$row[KUC03];
- $t_KUC04=$row[KUC04];
- $t_KUC05=$row[KUC05];
- for ($i =1;$i<=$o_Num;++$i ){
- $t_K05=$_GET['x_KUC05'.$i];
- //echo 't_K05'.$t_K05;
- if (!empty($t_K05)){
- $p_id =$t_KUC01;
- $p_sn =$t_K05;
- $p_ph =$t_KUC04;
- $p_num=-1;
- updatekuchen($p_id,$p_sn,$p_ph,$p_num,$conn);
- $p_id =$t_KUC01;
- $p_sn =$t_KUC05;
- $p_ph =$t_KUC04;
- $p_num=1;
- updatekuchen($p_id,$p_sn,$p_ph,$p_num,$conn);
- }
- }
- header("location:listdelt.php?KUCID=$t_KUC01");
- ?>