$sq=select name from employee where salary<=all(select salary from employee)
$rs=mysqli_query($conn,$rs)
echo mysqli_num_rows($rs)
mysql正常返回记结果,但php没报错,但结果不对,应该返回人名,但返回的是1
$sq1=select count(*)from employee where country='china'
$rs1=mysqli_query($conn,$rs1)
echo mysqli_num_rows($rs1)
mysql返回的记录数是30,但php返回的是1,数据库确实有国籍为中国的30人的记录
select * from employee
共有65条信息,php返回的记录数对
你把sql打印输出看看,是不是带了其他条件。
您好,我是有问必答小助手,您的问题已经有小伙伴解答了,您看下是否解决,可以追评进行沟通哦~
如果有您比较满意的答案 / 帮您提供解决思路的答案,可以点击【采纳】按钮,给回答的小伙伴一些鼓励哦~~
ps: 问答会员年卡【8折】购 ,限时加赠IT实体书,即可 享受50次 有问必答服务,了解详情>>>https://t.csdnimg.cn/RW5m