RE: [PHP-DB] LIMIT

From: Date: Fri, 30 Jun 2000 07:59:20 +0000
Subject: RE: [PHP-DB] LIMIT
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-776@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). Do I really need to make two queries to obtain the number of rows for SELECT * FROM tblArtikel ORDER BY artID maxrows = mysql_num_rows to know when to stop when iterating with SELECT * FROM tblArtikel ORDER BY artID LIMIT 0,5 SELECT * FROM tblArtikel ORDER BY artID LIMIT 5,5 SELECT * FROM tblArtikel ORDER BY artID LIMIT 10,5 ... -- Torsten

« previous php.db (#776) next »