Hi,
I am trying to list all the tables with their row counts in a databse... I have been racking my brain on how to do this. So far I have figured out that there is a function mysql_list_tables(), however, this is depreciated and should not be used. So this is my code so far, but I have no idea on how to include my while statments to output a list like so
Code:TABLE NAME COUNT table1 1204 table2 1053 table3 5042PHP Code:<?php
include ("config.php");
if (!mysql_connect('$host', '$user', '$pass')) {
** echo 'Could not connect to mysql' . mysql_error;
** exit;
}
$result=mysql_query('SHOW TABLES FROM $db') or die(mysql_error);
?>




Bookmarks