[PHP-DB] Limited number of database results

2006-12-13 Thread Chris Carter
Hi, I have more than 200 rows of data to show to the user. How can I limit it to say 25 rows per page and give an option at the bottom to the user to keep clicking for more till s/he reaches the end of data. my db code is: /tr /thead tbody ?php //

RE: [PHP-DB] Limited number of database results

2006-12-13 Thread Bastien Koert
use the limit clause $count = 25; $query=SELECT * FROM WHERE hello = '$hello' limit $count; Bastien From: Chris Carter [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] Limited number of database results Date: Wed, 13 Dec 2006 08:51:47 -0800 (PST) Hi, I have more than 200

Re: [PHP-DB] Limited number of database results

2006-12-13 Thread Niel Archer
Hi use a LIMIT clause in your SQL. Something like: $query=SELECT * FROM WHERE hello = '$hello' LIMIT . ($page - 1) * $rows . , $rows; then you only need specify the logic to set the page, row and limitations Niel -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP-DB] Limited number of database results

2006-12-13 Thread John Meyer
Niel Archer wrote: Hi use a LIMIT clause in your SQL. Something like: $query=SELECT * FROM WHERE hello = '$hello' LIMIT . ($page - 1) * $rows . , $rows; then you only need specify the logic to set the page, row and limitations You also typically need to use the mod operand