Oops, forgot to send it to the list:
Use an index and offset in your queries. You need 25 queries per page(=the offset), each page starting display from a different record (=the index) This would give something like this for page 1: $result = mysql_query("SELECT * FROM your_table WHERE table_field = 'blahblah' ORDER BY table_field ASC LIMIT 0,25"); ==> this will result in records 1 to 24 For page 2, in one way or another, you just increase the index by 25, resulting in $result = mysql_query("SELECT * FROM your_table WHERE table_field = 'blahblah' ORDER BY table_field ASC LIMIT 25,25"); For page 3 : $result = mysql_query("SELECT * FROM your_table WHERE table_field = 'blahblah' ORDER BY table_field ASC LIMIT 50,25"); Of course, you define the index as a php-variable and automatically increase it every next page. Hope it helps, CB -----Original Message----- From: Aqua [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 27, 2002 07:55 To: [EMAIL PROTECTED] Subject: Display Records in Multiple Pages I have 100 records in mySQL database and I need to display them in my web page using php and html. How to display them in multiple pages? Each page must contain 25 records. Does anyone know how to do it other than create 4 pages and manually list the records there? or maybe point me some reference please. Your help will be much appreciated. Thanks! Aqua --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php