IT & Programming

Get total number of records in mysql table with PHP

  • How to get total number of records in mysql table.
  • Count total number of mysql table records.
  • Show total records in mysql table.
  • Calculate total records of mysql table.

This script displays the total number of records from a mysql table.

Script

$sql = mysql_query("select * from products");

echo mysql_num_row($sql);

Output

55

Leave A comment

Email address is optional and will not be published. Only add email address if you want a reply from blog author.
Please fill required fields marked with *