Counting Rows MySQL Problems Please Help

wxdqz

New Member
In my database I have 50 tables and I would like to count the rows and display the total.
This is what I do at the moment.

<?php

$cursor = mysql_query("select count(*) from table1");
if (!$cursor)
{
echo("<H3>MySQL error: " . mysql_error() . "</H3>");
exit();
}

while ( $row = mysql_fetch_array($cursor) )
{
echo("There are " . $row["count(*)"] . " entries found");
}

?>

This is for one table only! How is it possible to count all rows in all tables and display the grand total?
 
Back
Top