Re: mysql results with limit

From: Date: Sun, 05 Sep 2004 02:21:46 +0000
Subject: Re: mysql results with limit
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-36048@lists.php.net to get a copy of this message
Michael Gale wrote:
Hello, Right now I have a mysql select statement with the LIMIT option of 500. Is there a way to find what the total number of selected results would of been with out doing a mysql select first with out the limi and using mysql_num_rows ? Thanks
You could use SQL_CALC_FOUND_ROWS as it works somewhat differently, and probably faster, than the approach you suggest above. This function was introduced in mysql 4.0.0. http://dev.mysql.com/doc/mysql/en/Information_functions.html Doug

« previous php.db (#36048) next »