RE: [PHP-DB] retrieval of NEXT, PREV records
| From: | John Huggins | Date: | Wed, 21 Feb 2001 22:00:32 +0000 |
| Subject: | RE: [PHP-DB] retrieval of NEXT, PREV records | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-6844@lists.php.net to get a copy of this message | ||
Perhaps it is ordered that way, perhaps not, but live by the creed "Expect
nothing and you will never be disappointed."
Go ahead and specify the order you demand.
> -----Original Message-----
> From: JJeffman [mailto:jjeffmanweb@conex.com.br]
> Sent: Wednesday, February 21, 2001 4:40 PM
> To: php-db@lists.php.net
> Subject: Re: [PHP-DB] retrieval of NEXT, PREV records
>
>
> As far as I know, if you do not set any special order, the table
> is ordered
> by primary key, isn't it ?
>
> Jayme.
>
>
> -----Mensagem Original-----
> De: Chris Book <csbook@lyricfind.com>
> Para: JJeffman <jjeffmanweb@conex.com.br>; Adv. Systems Design
> <asd_2000@yahoo.com>; <php-db@lists.php.net>
> Enviada em: quarta-feira, 21 de fevereiro de 2001 11:16
> Assunto: RE: [PHP-DB] retrieval of NEXT, PREV records
>
>
> > you have to make sure you order by Rec_id all the time too.
> >
> > -----Original Message-----
> > From: JJeffman [mailto:jjeffmanweb@conex.com.br]
> > Sent: Tuesday, February 20, 2001 4:39 PM
> > To: Adv. Systems Design; php-db@lists.php.net
> > Subject: Re: [PHP-DB] retrieval of NEXT, PREV records
> >
> >
> > "SELECT * FROM Table WHERE Rec_id > $recid LIMIT 1" always bring you the
> > next record no matter the Rec_id is.
> >
> > HTH
> >
> > Jayme.
> >
> > -----Mensagem Original-----
> > De: Adv. Systems Design <asd_2000@yahoo.com>
> > Para: <php-db@lists.php.net>
> > Enviada em: terça-feira, 20 de fevereiro de 2001 11:41
> > Assunto: [PHP-DB] retrieval of NEXT, PREV records
> >
> >
> > > I have set up links to browse records one by one,
> > > using (ID+1) for NEXT and (ID-1) for PREV...the only
> > > problem is that if there is a hole in the ID sequence
> > > (as from DELETION), there is no record returned...How
> > > can I have it so that the 'holes' are paved over and
> > > not returned?
> > >
> > > TIA
> > >
> > > Luis
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Get personalized email addresses from Yahoo! Mail - only $35
> > > a year! http://personal.mail.yahoo.com/
> > >
> > > --
> > > PHP Database Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> > > For additional commands, e-mail: php-db-help@lists.php.net
> > > To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
> > >
> >
> >
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>