Re: [PHP-DB] retrieval of NEXT, PREV records

2001-02-21 Thread JJeffman
ra: <[EMAIL PROTECTED]> Enviada em: quarta-feira, 21 de fevereiro de 2001 19:06 Assunto: RE: [PHP-DB] retrieval of NEXT, PREV records > It would only be ordered that way if you had not > deleted any records and added new ones. IF there > are ones deleted, the next ones frill in th

RE: [PHP-DB] retrieval of NEXT, PREV records

2001-02-21 Thread Sweep the Net
nd you will never be disappointed." > >Go ahead and specify the order you demand. > > > > -Original Message- > > From: JJeffman [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, February 21, 2001 4:40 PM > > To: [EMAIL PROTECTED] > > Subject: Re: [

RE: [PHP-DB] retrieval of NEXT, PREV records

2001-02-21 Thread John Huggins
:40 PM > To: [EMAIL PROTECTED] > 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: Ch

Re: [PHP-DB] retrieval of NEXT, PREV records

2001-02-21 Thread JJeffman
> 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:[EMAIL PROTECTED]] > Sent: Tuesday, Februar

RE: [PHP-DB] retrieval of NEXT, PREV records

2001-02-21 Thread Chris Book
you have to make sure you order by Rec_id all the time too. -Original Message- From: JJeffman [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 20, 2001 4:39 PM To: Adv. Systems Design; [EMAIL PROTECTED] Subject: Re: [PHP-DB] retrieval of NEXT, PREV records "SELECT * FROM Table

Re: [PHP-DB] retrieval of NEXT, PREV records

2001-02-20 Thread JJeffman
"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 <[EMAIL PROTECTED]> Para: <[EMAIL PROTECTED]> Enviada em: terça-feira, 20 de fevereiro de 2001 11:41 Assunto: [PHP-DB] ret

Re: [PHP-DB] retrieval of NEXT, PREV records

2001-02-20 Thread Peter J. Krawetzky
Check for a return code from the (I assume you are using a relational database) database stating a row was not found. If the condition is true, then re-execute the ID+1 or ID-1 code to select the next row in sequence. You can keep looping through this until you get a return code from the database