Do you have phpMyAdmin on your server?

Because when it displays a table with more than 30 results, it splits it
into pages of 30.  The brilliant bit is that it always displays the query up
the top of the page, so you can learn what's going on.

You want to read up on LIMIT in the MySQL manual.

In short, SELECT * FROM 'mytable' LIMIT 60, 30 Will return rows 60 through
to 90.

Then you need to dynamically generate your next and back links, which pass
some kind of offset to the query:

<A HREF="script.php?offset=20">next 10</a>

Your query might look like:

$sql = "SELECT * FROM mytable LIMIT {$_GET['offset']}, 10";

Good luck.


on 27/08/02 7:45 AM, pax ([EMAIL PROTECTED]) wrote:

> Hi,
> I am looking for an example in php/MySql dealing with Next 5 > type of
> queries ..does anyone have any links?
> Thank you for your help
> Pax

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to