php判断mysql数据库是否为NULL,然后根据结果,显示script内容

2025-02-25 15:51:46
推荐回答(1个)
回答1:

这样判断:
if (mysql_num_rows($result) < 1)
echo '记录集为空';
else
echo '有结果';
这里写在js中判断
if(mysql_num_rows($result) >= 1)