时间:2021-07-01 10:21:17 帮助过:11人阅读
id分别是ishijian1,ishijian2,语句是
echo ' ';
?>
起始时间
截止时间
c_huizong.php
//订单查询
if ($_POST['1shijian1'])
{
echo "
document.getElementById('1shijian1').value='".$_POST['1shijian1'].
"';document.getElementById('1shijian2').value='".$_POST['1shijian2'].
"';cg1name();";
if ($_POST['1shijian1']<>NULL)
$shijian1=" and COPTC.TC003>=".$_POST['1shijian1'];
else
$shijian1="";
if ($_POST['1shijian2']<>NULL)
$shijian2=" and COPTC.TC003<=".$_POST['1shijian2'];
else
$shijian2="";
require_once('i_code/connect.php');
$query="select leixing,xifen,sewen,ddgm,bztdb,daba,SUM(TD008) AS TD008,SUM(TA015)TA015,SUM(RKZS)RKZS,SUM(D310)D310,SUM(D305)D305,SUM(D304)D304,SUM(D3023)D3023,SUM(TH008)TH008,SUM(TJ007)TJ007
FROM chaxun
LEFT JOIN DDTJMX ON MA003=leixing and xifen=XIFEN AND sewen=DDTJMX.UDF10 AND ddgm=DDGM and daba=XINGHAO
left join COPTC on TC001=DDTJMX.TD001 AND TC002=DDTJMX.TD002
where xifen<>'' and xifen<>'5050' and TC003>='20150110' AND TC003<='20150120'
GROUP BY leixing,xifen,sewen,ddgm,bztdb,daba
union all
select leixing,xifen,null as sewen,null as ddgm,bztdb,null as daba,SUM(TD008) AS TD008,SUM(TA015)TA015,SUM(RKZS)RKZS,SUM(D310)D310,SUM(D305)D305,SUM(D304)D304,SUM(D3023)D3023,SUM(TH008)TH008,SUM(TJ007)TJ007
FROM chaxun
LEFT JOIN DDTJMX ON MA003=leixing and xifen=XIFEN
left join COPTC on TC001=DDTJMX.TD001 AND TC002=DDTJMX.TD002
where xifen='5050' and TC003>='20150110' AND TC003<='20150120'
GROUP BY leixing,xifen,bztdb
union all
select leixing,null as xifen,null as sewen,null as ddgm,bztdb, null as daba,SUM(TD008) AS TD008,SUM(TA015)TA015,SUM(RKZS)RKZS,SUM(D310)D310,SUM(D305)D305,SUM(D304)D304,SUM(D3023)D3023,SUM(TH008)TH008,SUM(TJ007)TJ007
FROM chaxun
LEFT JOIN DDTJMX ON MA003=leixing
left join COPTC on TC001=DDTJMX.TD001 AND TC002=DDTJMX.TD002
where xifen='' and TC003>='20150110' AND TC003<='20150120'
GROUP BY leixing,bztdb".$shijian1.$shijian2;
$result=mssql_query($query);
$row_num=mssql_num_rows($result);
if ($row_num<=10000 && $row_num>0)
{
echo "
";
echo "类别 ;
细分 ;
色温 ;
订单规模 ;
标准投单比 ;
打靶 ;
订单量 ;
预计产量 ;
总入库数 ;
标准入库 ;
销货数量 ;
销退数量 ;
跟踪信息 ;
";while($row=mssql_fetch_assoc($result))
{
echo"
";echo"
".$row['leixing']." ";
echo"".$row['xifen']." ";
echo"".$row['sewen']." ";
echo"".$row['ddgm']." ";
echo"".$row['bztdb']." ";
echo"".$row['daba']." ";
echo"".number_format($row['TD008'],0)." ";
echo"".number_format($row['TA015'],0)." ";
echo"".number_format($row['RKZS'],0)." ";
echo"".number_format($row['D310'],0)." ";
echo"".number_format($row['TH008'],0)." ";
echo"".number_format($row['TJ007'],0)." ";
echo"跟踪信息 ";
//跟踪信息echo"
\n";}
echo"
";
echo'';}
mssql_close($conn);
}
?>
现在一运行语句是错的,是后面的语句里面的查询语句有错,求指正。
人气教程排行
-
174次
1
php如何获取跳转前的url
-
174次
2
php格林威治时间转换成当前时间的方法
-
174次
3
为什么php不能做大型系统?
-
174次
4
range函数怎么用
-
174次
5
php中计算页面加载时间几种方法总结_PHP教程
-
174次
6
求帮助,关于paypal支付返回值修改订单状态
-
174次
7
typecho怎么配置文章内容页?
-
174次
8
PhpStorm左侧structure不显示文件的方法列表是这么回事?
-
174次
9
查看PHP的环境变量_PHP
-
174次
10
PHP Primary script unknown 解决方法总结
-
174次
11
php的命名空间与自动加载实现方法
-
174次
12
解决laravel 出现ajax请求419(unknown status)的问题
-
173次
13
php 如何删除mysql记录
-
173次
14
PHP如何替换数组中的指定元素
-
173次
15
怎么去除字符串中非汉字、非字母、非数字的字符
-
173次
16
mysql如何一次执行多条SQL语句
-
173次
17
修改header里面的Connection为close解决方法
-
173次
18
PHP基于session.upload_progress 实现文件上传进度显示功能详解
-
173次
19
php5.6.x到php7.0.x特性小结
-
172次
20
php为什么会出现504错误