Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图显示有小猫的人的总数。
$query = mysql_query("SELECT * FROM people.kittens WHERE IS NOT NULL");
问题是该字段未设置为NULL空白或有数据。然后我会显示总数:
NULL
$Totalpeoplewithkittens = mysql_num_rows($query);
我知道mysql_query已经过时了。只是测试/学习。
mysql_query
关于什么
$query = mysql_query("SELECT count(kittens) FROM people WHERE kittens > ''");
使用类似 Select count(*) from...