I don't know about "Cursors" but I think you can use the same approach we
discussed on navigate record by record, " retrieval of NEXT, PREV records"
was the subject.
If set an order by clause and search for the first record you can use a
where clause like this :
...
$current = $row["field"] ;
// for next row
$query = "select * from table where field_name > '$current' limit 1";
// for previous row
$query = "select * from table where field_name < '$current' limit 1";
HTH
Jayme.
www.conex.com.br/jjeffman/antispam.html
-----Mensagem Original-----
De: Andrew Hill <[EMAIL PROTECTED]>
Para: Dreamvale <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Enviada em: quinta-feira, 22 de fevereiro de 2001 14:10
Assunto: RE: [PHP-DB] next & previous record
> You want to use Cursors, and I don't believe MySQL supports cursors yet,
> although I could be wrong.
>
> Best regards,
> Andrew
> --------------------------------------
> Andrew Hill - OpenLink Software
> Director Technology Evangelism
> eBusiness Infrastructure Technology
> http://www.openlinksw.com
>
>
> > -----Original Message-----
> > From: Dreamvale [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, February 22, 2001 11:42 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP-DB] next & previous record
> >
> >
> > I was not refering pagination.
> >
> > suppossing there are these 3 records
> >
> > ABC
> > DEF
> > GHI
> > LJK
> >
> > now a search is done by entering D, which using like & %, and limit
would
> > return the record DEF. The "next" would forward to GHI and
> > "previous" would
> > backward to ABC.
> >
> > any idea?
> >
> > thanks.
> >
> >
> > ----- Original Message -----
> > From: "Brunner, Daniel" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, February 23, 2001 12:12 AM
> > Subject: FW: [PHP-DB] next & previous record
> >
> >
> > > > Check this link out...
> > > >
http://www.oreillynet.com/pub/a/php/2000/11/02/next_previous.html?page
> > > > =1
> > > >
> > > > It's about Next/previous links...
> > > >
> > > > It does work, but I've yet to get to get it to work completely with
> > > > displaying the records (rows) and the links at the same time...
> > > >
> > > > It just takes some time to find how to use the mysql_query variable
to
> > > > print out the rows, with every click of the link......
> > > >
> > > > If you get any head way let me know...
> > > >
> > > > It's great code....
> > > >
> > > > Dan
> > > >
> > > >
> > > >
> > > > ----------
> > > > From: Dreamvale
> > > > Sent: Thursday, February 22, 2001 9:55 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [PHP-DB] next & previous record
> > > >
> > > > hi all,
> > > >
> > > > need to implement record scrolling, one at a time -either forward or
> > > > backward, on MySQL. The key is a char (32) containing part numbers.
> > > >
> > > > anyone has done this before?
> > > >
> > > > thanks in advance.
> > > >
> > > > dreamvale
> > > >
> > > >
> > > > --
> > > > 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]
> > >
> >
> >
> > --
> > 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]
>
--
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]