$dbname = $empire->gettotal("select database() as total;");
第二步,获取表的行数,就是记录数:
$tbname=$dbtbpre.'ecms_news'; $dbname = $empire->gettotal("select database() as total;"); echo $num = $empire->gettotal("select TABLE_ROWS as total FROM information_schema.tables where TABLE_SCHEMA='$dbname' and TABLE_NAME='$tbname' limit 1");