Heim > Artikel > Backend-Entwicklung > PHP 显示问题
<div title="待处理工作事项" iconCls="icon-search" closable="true" style="height:150px;padding:10px;"> <?php include($_SERVER['DOCUMENT_ROOT']."/auth.php");//调用数据库连接文件 $query3 = "select count(*) from (select * from (select * from bydms_dutyapp where dutyapp_approverid='$MY_SYSNUMBER' order by dutyapp_datetime desc ) as bydms_tempa left join bydms_project on dutyapp_projectid=project_id ) as bydms_tempb where dutyapp_result='审批中' "; $result3 = mysql_query($query3); while ($row = mysql_fetch_array($result3)) { //输出所有的查询结果 echo "您当前有".$row."条待审批流程!"; } ?> </div>
echo "您当前有".$row[0]."条待审批流程!";
代码无语法错
请说明你遇到的问题
这是一个待处理事项的显示的小页面,调试后,无法加载数据,$row条数没有输出结果
echo "您当前有".$row[0]."条待审批流程!";
不行,一直在加载数据中
$result3 = mysql_query($query3) or die(mysql_error());
$result3 = mysql_query($query3) or die(mysql_error());
呃,还是不行
请你说清楚你遇到得了什么问题
$query3 = "select count(*) from (select * from (select * from bydms_dutyapp where dutyapp_approverid='$MY_SYSNUMBER' order by dutyapp_datetime desc ) as bydms_tempa left join bydms_project on dutyapp_projectid=project_id ) as bydms_tempb where dutyapp_result='审批中' ";
SQL语句输出的结果为1
$query3 = "select count(*) from (select * from (select * from bydms_dutyapp where dutyapp_approverid='$MY_SYSNUMBER' order by dutyapp_datetime desc ) as bydms_tempa left join bydms_project on dutyapp_projectid=project_id ) as bydms_tempb where dutyapp_result='审批中' ";
这是首页的一个div层,现在就是这段代码无法输出结果,导致整个页面一直在加载中,无法显示
在 auth.php 里面靠前的地方弄个echo测试一下……
已自己调试OK 了,谢了,大家