嗨,伙计们,我只查询了12行,即使我有12行。请帮助
$connection = mysqli_connect("localhost","root","","database");
$qry="SELECT COUNT(*) as count FROM table";
$result=mysqli_query($connection, $qry);
答案 0 :(得分:-2)
正如Devon所述,COUNT是一个聚合函数,因此它将仅返回1行。如果要检索所有12行,请执行以下操作:
SELECT * FROM table;