Home > Backend Development > PHP Tutorial > PHP 显示有关问题

PHP 显示有关问题

WBOY
Release: 2016-06-13 11:49:58
Original
847 people have browsed it

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>
Copy after login

这段代码有错吗?
------解决方案--------------------
本帖最后由 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='审批中' "; 
Copy after login

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

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template