RE: [PHP-DB] Mysql Function to display number of records
| From: | Bastien Koert | Date: | Wed, 03 Nov 2004 00:15:20 +0000 |
| Subject: | RE: [PHP-DB] Mysql Function to display number of records | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-37160@lists.php.net to get a copy of this message | ||
use the offset parameter
$offset = 0; //and is set from the application
SELECT * FROM blah WHERE something<>0 LIMIT $offset , 5;
bastien
From: jovanross@msn.com (Jovan Ross) To: php-db@lists.php.net Subject: [PHP-DB] Mysql Function to display number of records Date: 2 Nov 2004 20:28:41 -0000 I have a query that uses a LIMIT clause. Let's say it looks like this: SELECT * FROM blah WHERE something<>0 LIMIT 5; Ok, now my table really has 20 rows that satisfy the WHERE statement but I only retrieved 5. There was a function/statement that I could use to find out the total number of rows that would have been returned had I not used the LIMIT clause. Does anyone know what the statement was? I forget. Yes, I'm using PHP btw. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php