首頁 >後端開發 >php教程 >PHP 显示有关问题

PHP 显示有关问题

WBOY
WBOY原創
2016-06-13 11:49:58849瀏覽

PHP 显示问题

    <div title="待处理工作事项" iconCls="icon-search" closable="true" style="height:150px;padding:10px;"><br />      <?php<br />         include($_SERVER['DOCUMENT_ROOT']."/auth.php");//调用数据库连接文件<br />        $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='审批中' "; <br />        $result3 = mysql_query($query3);<br />        while ($row = mysql_fetch_array($result3)) {     //输出所有的查询结果<br />        echo "您当前有".$row."条待审批流程!"; <br />        }<br />        ?><br />    </div>

这段代码有错吗?
------解决方案--------------------

本帖最后由 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打印出来放到数据库去执行看看有没有结果
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn