Multiple page listings with a MySQL query

From: Date: Wed, 29 Nov 2000 21:19:01 +0000
Subject: Multiple page listings with a MySQL query
Groups: php.general 
Request: Send a blank email to php-general+get-27876@lists.php.net to get a copy of this message
I'm looking for an easy way to select pages (ie. Next Page, Previous Page and/or Page 1, 2, 3, etc.) of a MySQL query that would display multiple rows of results (ie. with a "while" commond). So when you get to row 10, it stops and you can go on to listings 11-20, or whatever. This is displayed after a search of the database. It is also involved a "switch" command, but I don't think that it would matter. I can think of doing it with setting up new fuctions for Next Page and Previous Page with a LIMIT in the SELECT command. Also using a counter string for the different pages until it reaches the string for MYSQL_NUM_ROWS. But this seems like it would take too much programming for something as simple as this. Any suggestions?

« previous php.general (#27876) next »