这段代码有错吗?------解决方案----------------">
当前位置:Gxlcms > PHP教程 > PHP显示有关问题

PHP显示有关问题

时间:2021-07-01 10:21:17 帮助过:28人阅读

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."条待审批流程!";
}
?>

这段代码有错吗?
------解决方案--------------------
本帖最后由 xuzuning 于 2014-03-04 09:33:02 编辑

echo "您当前有".$row[0]."条待审批流程!";

------解决方案--------------------
$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='审批中' "; 

把$query3打印出来放到数据库去执行看看有没有结果

人气教程排行