Re: Count total number of records in db

2008-07-12 Thread Rob Wultsch
On Fri, Jul 11, 2008 at 4:24 AM, Warren Windvogel [EMAIL PROTECTED] wrote: $tables = mysql_list_tables($DB_DBName); Not that it matters much, but mysql_list_tables() is deprecated. -- Rob Wultsch -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Count total number of records in db

2008-07-11 Thread Warren Windvogel
Hi, Can anyone tell me how to check the total number of records in a database in MySQL version 4.0 Googling doesn't seem to help and all previous posts assume version 5.* Regards Warren -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: Count total number of records in db

2008-07-11 Thread MarisRuskulis
Warren Windvogel wrote: Hi, Can anyone tell me how to check the total number of records in a database in MySQL version 4.0 Googling doesn't seem to help and all previous posts assume version 5.* Regards Warren for table you can use: SELECT COUNT(*) from the_table_name; in whole database

Re: Count total number of records in db

2008-07-11 Thread Radoulov, Dimitre
Warren Windvogel wrote: Hi, Can anyone tell me how to check the total number of records in a database in MySQL version 4.0 Googling doesn't seem to help and all previous posts assume version 5.* [...] Something like this: mysql -NBe'show databases' | while IFS= read -r db; do

Re: Count total number of records in db

2008-07-11 Thread Warren Windvogel
Radoulov, Dimitre wrote: mysql -NBe'show databases' | while IFS= read -r db; do printf show tables from %s;\n $db | mysql -N | while IFS= read -r t; do printf select count(1) from %s.%s;\n $db $t done done | mysql -N | awk '{ s += $1 }END{ print s }' I quickly put