listdelt.php
资源名称:minierp.rar [点击查看]
上传用户:yantgcom
上传日期:2013-07-19
资源大小:478k
文件大小:1k
源码类别:
MySQL数据库
开发平台:
PHP
- <?php
- include ("../inc/db.php");
- include ("../inc/phpmkrfn.php");
- include ('../inc/xtpl.php');
- $t_AUTOID=$_GET['AUTOID'];
- if (empty($t_AUTOID)){$t_AUTOID=-1;};
- $t_KUCID=$_GET['KUCID'];
- $xtpl=new XTemplate ("listdelt.html");
- $conn = phpmkr_db_connect(HOST, USER, PASS, DB, PORT);
- $sSql ="select kuchen.*,ID,SUM(KUC02) AS KUCTOL,PROD01,PROD04,PROD05 from kuchen LEFT JOIN products ON kuchen.KUC01 = products.ID where kuchen.KUC01='$t_KUCID' group by kuchen.KUC01 ";
- $rs = phpmkr_query($sSql,$conn) or die("Failed to execute query: " . phpmkr_error() . '<br>SQL: ' . $sSql);
- $row = mysql_fetch_array($rs, MYSQL_ASSOC);
- $deltid=$row[KUC01]; //送货明细编号
- $xtpl->assign("mDATA",$row); /* assign array data */
- //**************************************************
- $sSql ="select kuchen.*,ID,PROD01,PROD04,PROD05 from kuchen LEFT JOIN products ON kuchen.KUC01 = products.ID where kuchen.KUC01='$deltid'";
- $rs = phpmkr_query($sSql,$conn) or die("Failed to execute query: " . phpmkr_error() . '<br>SQL: ' . $sSql);
- while ($row = mysql_fetch_array($rs, MYSQL_ASSOC)) {
- $xtpl->assign("DATA",$row); /* assign array data */
- $xtpl->parse("main.table.row"); /* parse a row */
- }
- $xtpl->parse("main.table");
- $xtpl->parse("main");
- $xtpl->out("main");
- ?>