hi guys the query only return one rows even i have 12 rows. Please help
$connection = mysqli_connect("localhost","root","","database");
$qry="SELECT COUNT(*) as count FROM table";
$result=mysqli_query($connection, $qry);
hi guys the query only return one rows even i have 12 rows. Please help
$connection = mysqli_connect("localhost","root","","database");
$qry="SELECT COUNT(*) as count FROM table";
$result=mysqli_query($connection, $qry);
As Devon mentioned, COUNT is an aggregate function, so it will only return 1 row. If you want to retrieve all 12 rows, do:
SELECT * FROM table;