代码运行之后开头出现10来个;就是分号,什么原因嗯

yougerenlaile 2015-02-02 08:59:51
if ($_POST['1shijian1'])
{
echo '<link rel="stylesheet" type="text/css" href="i_code/style.css" /><title>数据查询</title>';
echo "<script type='text/javascript'>
document.getElementById('1shijian1').value='".$_POST['1shijian1'].
"';document.getElementById('1shijian2').value='".$_POST['1shijian2'].
"';</script>";

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,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=''".$shijian1.$shijian2." GROUP BY leixing,bztdb
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' ".$shijian1.$shijian2." GROUP BY leixing,xifen,bztdb
union all
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'".$shijian1.$shijian2." GROUP BY leixing,xifen,sewen,ddgm,bztdb,daba order by xifen,sewen,daba";


$result=mssql_query($query);
$row_num=mssql_num_rows($result);

if ($row_num>0)
{
echo "<table class='tablehkled' id='tablecolor' align='center' border='1' cellspacing='1'cellpadding='1' style='width:80%'>
<tr align='center'>";
echo "<th style='width:80px'>产品类别</th>;
<th style='width:80px'>产品细分</th>;
<th style='width:150px'>色温</th>;
<th style='width:100px'>订单规模</th>;
<th style='width:100px'>标准投单比</th>;
<th style='width:100px'>打靶</th>;
<th style='width:100px'>订单量</th>;
<th style='width:100px'>预计产量</th>;
<th style='width:100px'>总入库数</th>;
<th style='width:80px'>标准入库</th>;
<th style='width:80px'>销货数量</th>;
<th style='width:80px'>销退数量</th>;
<th style='width:80px'>跟踪信息</th>;
</tr></tr>";

while($row=mssql_fetch_assoc($result))
{
echo"<tr align='center'>";
echo"<td>".$row['leixing']."</td>";
echo"<td>".$row['xifen']."</td>";
echo"<td>".$row['sewen']."</td>";
echo"<td>".$row['ddgm']."</td>";
echo"<td>".$row['bztdb']."</td>";
echo"<td>".$row['daba']."</td>";
echo"<td>".number_format($row['TD008'],0)."</td>";
echo"<td>".number_format($row['TA015'],0)."</td>";
echo"<td>".number_format($row['RKZS'],0)."</td>";
echo"<td>".number_format($row['D310'],0)."</td>";
echo"<td>".number_format($row['TH008'],0)."</td>";
echo"<td>".number_format($row['TJ007'],0)."</td>";
echo"<td onclick='window.open(\"c_huizongall.php?n1=".strval($row['xifen'])."&n2=".strval($row['daba'])."\")'>跟踪信息</td>";

echo"</tr> \n";
}
echo"</table>";
echo'<SCRIPT type="text/javascript" src="i_code/color.js"></SCRIPT>';

}

mssql_close($conn);

}
?>
...全文
153 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
傲雪星枫 2015-02-02
  • 打赏
  • 举报
回复
echo "<th style='width:80px'>产品类别</th>; 你自己echo的。。 刪掉就可以了。

if ($_POST['1shijian1'])
{
echo '<link rel="stylesheet" type="text/css" href="i_code/style.css" /><title>数据查询</title>';
echo "<script type='text/javascript'>
document.getElementById('1shijian1').value='".$_POST['1shijian1'].
"';document.getElementById('1shijian2').value='".$_POST['1shijian2'].
"';</script>";

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,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=''".$shijian1.$shijian2." GROUP BY leixing,bztdb
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' ".$shijian1.$shijian2." GROUP BY leixing,xifen,bztdb
union all
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'".$shijian1.$shijian2." GROUP BY leixing,xifen,sewen,ddgm,bztdb,daba order by xifen,sewen,daba";


$result=mssql_query($query);
$row_num=mssql_num_rows($result);

if ($row_num>0)
{
echo "<table class='tablehkled'  id='tablecolor' align='center' border='1' cellspacing='1'cellpadding='1' style='width:80%'>
<tr align='center'>";
echo "<th  style='width:80px'>产品类别</th>
<th style='width:80px'>产品细分</th>
<th style='width:150px'>色温</th>
<th style='width:100px'>订单规模</th>
<th style='width:100px'>标准投单比</th>
<th style='width:100px'>打靶</th>
<th style='width:100px'>订单量</th>
<th style='width:100px'>预计产量</th>
<th style='width:100px'>总入库数</th>
<th style='width:80px'>标准入库</th>
<th style='width:80px'>销货数量</th>
<th style='width:80px'>销退数量</th>
<th style='width:80px'>跟踪信息</th>
</tr></tr>";

while($row=mssql_fetch_assoc($result))
{
echo"<tr  align='center'>";
    echo"<td>".$row['leixing']."</td>";
echo"<td>".$row['xifen']."</td>";
echo"<td>".$row['sewen']."</td>";
echo"<td>".$row['ddgm']."</td>";
echo"<td>".$row['bztdb']."</td>";
echo"<td>".$row['daba']."</td>";
echo"<td>".number_format($row['TD008'],0)."</td>";
echo"<td>".number_format($row['TA015'],0)."</td>";
echo"<td>".number_format($row['RKZS'],0)."</td>";
echo"<td>".number_format($row['D310'],0)."</td>";
echo"<td>".number_format($row['TH008'],0)."</td>";
echo"<td>".number_format($row['TJ007'],0)."</td>";
echo"<td  onclick='window.open(\"c_huizongall.php?n1=".strval($row['xifen'])."&n2=".strval($row['daba'])."\")'>跟踪信息</td>";

echo"</tr> \n";
}
echo"</table>";
echo'<SCRIPT type="text/javascript" src="i_code/color.js"></SCRIPT>';

}

mssql_close($conn);

}
?>
xuzuning 2015-02-02
  • 打赏
  • 举报
回复
echo "<th style='width:80px'>产品类别</th>; <th style='width:80px'>产品细分</th>; <th style='width:150px'>色温</th>; <th style='width:100px'>订单规模</th>; <th style='width:100px'>标准投单比</th>; <th style='width:100px'>打靶</th>; <th style='width:100px'>订单量</th>; <th style='width:100px'>预计产量</th>; <th style='width:100px'>总入库数</th>; <th style='width:80px'>标准入库</th>; <th style='width:80px'>销货数量</th>; <th style='width:80px'>销退数量</th>; <th style='width:80px'>跟踪信息</th>; </tr></tr>"; 不是你自己写的吗? 那些分号在表格元素外面,当然是要单独显示的了

21,887

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧