You need to specify an initial record and limit number. Try this:

<?
$initial_record = 0;
$records_to_display = 10;

$query = "SELECT something FROM some_table WHERE a=b ";
$query .= "limit 0, 10";

// carry out query here and add code to display results...

?>

This will give you the first 10 results, starting at record 0 and moving up.

>From this page you can add something like this:

<?
$initial_next = ($initial_record + $records_to_display);
<a href=\"yourlink.php?initial_record=$initial_next\">clickable text</a>

//yadda, yadda, yadda...

?>

That link will transfer in the next initial record as number 10, so you will
get 10 through 20.

That's quick, but that's the idea.

  --  Jason



On 7/17/01 4:33 AM, Erymuzuan Mustapa was heard saying:

> Hi all,
> php beginner
> say, I have query from a php page that returns several rows, but I don't
> want to display them all in a single page, but separate them in several
> pages and then be able to navigate by means of next and previous. Codes
> snippet would be very helpful. Kind of of page limit property.
> 
> Thanks in advance
> Erymuzuan
> 
> 
> ---------------------------------------------------------------------
> 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

Reply via email to