|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: [PHP-DB] mysql limit
From: Bob Lockie (bjlockie
lockie.ca)
Date: Fri Jul 02 2004 - 09:11:18 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Moved from a PHP list to a MySQL list. :-)
On 06/30/2004 09:55 PM John W. Holmes spoke:
> Bob Lockie wrote:
>
>> If I select rows with a limit clause I need to know if there are more
>> rows than the limit.
>
>
> Either do a SELECT COUNT(*) prior to your LIMIT query to see how many
> total rows there are, or use SQL_CALC_FOUND_ROWS and FOUND_ROWS() (more
> info here: http://dev.mysql.com/doc/mysql/en/Information_functions.html)
Is found_rows standard SQL?
I want to easily portable code.
Maybe I should use a select count first. :-)
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]