RE: [PHP-DB] LIMIT
| From: | Sam Masiello | Date: | Thu, 29 Jun 2000 18:06:50 +0000 |
| Subject: | RE: [PHP-DB] LIMIT | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-757@lists.php.net to get a copy of this message | ||
If you remove the LIMIT 0,5 from your query you will get all of the rows by
using mysql_num_rows. Since you have LIMIT 0,5 on their now, 5 rows are
returned from the query, thus there are 5 rows in your result set (hence,
the 5 returned from mysql_num_rows).
Sam Masiello
System Analyst
Chek.Com
(716) 853-1362 x289
smasiello@chekinc.com
-----Original Message-----
From: Torsten Curdt [mailto:tcurdt@dff.st]
Sent: Thursday, June 29, 2000 1:37 PM
To: php-db@lists.php.net
Subject: [PHP-DB] LIMIT
When quering:
SELECT * FROM tblArtikel ORDER BY artID LIMIT 0,5
"mysql_num_rows" always yields 5! But how can I getALL
affected rows? I tried "mysql_affected_rows" but this
still gives me always 5!
I like to implement a paging mechanism
(prev,next, etc.)
--
Torsten
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net