I've not seen the limit function, but it sounds quite uselfull.  Whatever method,
you could
pass the first or last keys related to the current page and an indication as to
whether you
are going forwards or backwards - I suppose that in PHP it could all be done in
one file,
self-referential-like, as the "arrows" would somehow comprise a form.

Phil J.


CC Zona wrote:

> In article <001301c0bafa$34d15be0$[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED] ("David Drummond") wrote:
>
> > Can anyone tell me what is the best way to implement displaying multiple
> > search results using next and previous buttons to cycle through all the
> > results.  I see this method done on a lot of sites but don't know how to do
> > it in PHP.
>
> "Limit" is how it's commonly done (though what's "best" really depends on
> what you're doing).  In mysql, it would be something like:
>
> mysql_query("select foo from bar limit 5,10",$connect) //show ten records
> from result set, starting with the sixth
>
> I believe phpbuilder.com has a tutorial on this.  If not them, then you
> shouldn't have much trouble finding examples on one of the other PHP
> tutorial sites.
>
> --
> CC
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to