0
例如,說我在做一個有限的查詢功能是這樣的:即使查詢有限,如何獲得表計數?
function getLogList()
{
$table='logs';
$result = mysql_query("SELECT id,title,timestamp,votes FROM {$table} ORDER BY count DESC LIMIT 1, 20");
return $result;
}
如果表可以說460項,有沒有辦法可以讓我的功能也與它的返回返回總數?
也許這將幫助你:http://www.arraystudio.com/as-workshop/mysql-get-total-number-of-rows-when - 使用 - limit.html – Tim