<?php
mysql_connect('localhost','数据库帐号','数据库密码');
mysql_select_db('数据库名');
$result = mysql_query('show tables'); //获取所有表名
$all_record = 0;
while($record = mysql_fetch_row($result)) {
$tb_name = $record[0]; //表名
$n = mysql_result(mysql_query('select count(*) from `'.$tb_name.'`'),0);
$all_record+=$n;
}
echo $all_record; //总记录数
?>
追问这个要在那里执行?
追答这个是 PHP 代码啊
追问我现在 已经解决了 用的sql语句 配合excel
本回答被提问者采纳