2013-01-22 49 views
0

mysql查询返回0行,即使它显示找到1记录。 这里是我的查询:mysql查询返回0行,即使它显示1记录fround

SELECT 
    TBCE.TBCE_CourseTitle, 
    TBCE.TBCE_CustomizedCourseTitle, 
    TBCE.TBCE_Q1, 
    TBCE.TBCE_Q2, 
    TBCE.TBCE_Q3, 
    TBCE.TBCE_Q4, 
    TBCE.TBCE_CourseDuration_Days, 
    TBCF.TBCF_CoursewareTypeID, 
    TBCF.TBCF_CourseLevelID_FK 
FROM tbl_epp_bp_site_class_forecast TBCF, 
    tbl_epp_bp_site_class_estimation TBCE 
WHERE TBCF.TBCF_SiteClassId_PK = TBCE.TBCE_SiteClassId_FK 
    AND TBCF.TBCF_BPID_FK = '620' 
ORDER BY TBCF.TBCF_CoursewareTypeID ASC  

没有发现记录,但它仍然显示发现1个记录。

请帮我找出解决方案。 在此先感谢。假

+0

可以请你写的输出,你得到什么? – mariosk89

+1

*什么*显示“找到1条记录”?请提供一些代码。 –

+0

您应该从(不推荐使用)mysql_ * API更新到PDO或类似的 –

回答

0

计数结果是一个

echo count(false); 
//output is 1 

我建议你使用mysql_num_rows这个

或计数不假前,使用条件