Re: mysql limit
| From: | John W. Holmes | Date: | Thu, 01 Jul 2004 01:55:35 +0000 |
| Subject: | Re: mysql limit | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-35068@lists.php.net to get a copy of this message | ||
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) oh, and echo "something about php"; -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com