Besides giving you the sudo, i,with the help of matt, gave you all the code. Just put it together.
Edited by BigDog, 19 March 2008 - 04:45 PM.
Posted 19 March 2008 - 04:44 PM
Edited by BigDog, 19 March 2008 - 04:45 PM.
Posted 19 March 2008 - 04:53 PM
$query = mysql_query("SHOW TABLE STATUS"); while($tbl = mysql_fetch_array($query)) { $ttlrows = $tbl[Rows]; } $totalrows = 0; while($tbl = mysql_fetch_array($query)) { $totalrows .= $tbl[Rows]; }
Posted 19 March 2008 - 04:55 PM
$query = mysql_query("SHOW TABLE STATUS"); $totalrows = 0; while($tbl = mysql_fetch_array($query)) { $totalrows .= $tbl[Rows]; }
Posted 19 March 2008 - 04:57 PM
Posted 19 March 2008 - 05:02 PM
$query= mysql_query("SHOW TABLE STATUS"); $count = 0; while($tbl = mysql_fetch_array($query)) { $count = $count + $tbl[Rows]; } echo $count;
Posted 19 March 2008 - 05:08 PM
Posted 19 March 2008 - 05:11 PM
<?php $sql = mysql_query( "SHOW TABLES" ); while( $table = mysql_fetch_array( $sql ) ) { $count = mysql_num_rows( mysql_query( "SELECT `id` FROM `" . $table['0'] . "`" ) ); //// OR list( $count ) = mysql_fetch_row( mysql_query( "SELECT COUNT( `id` ) FROM `" . $table['0'] . "`" ) ); ///------- $total += $count; } echo $total; //// Echos the total number of rows ?>
Posted 19 March 2008 - 05:28 PM
0 members, 0 guests, 0 anonymous users