Re: [PHP] finding next and prev record in mysql

2007-05-13 Thread Richard Lynch
On Thu, May 10, 2007 11:54 pm, Richard Kurth wrote: How would I find the next id and the prev id in sql statement like the one below. The id number is not going to be in order so I can't do a or limit 1 on the search SELECT id FROM contacts WHERE category = '5' AND subcategory = '1' AND

RE: [PHP] finding next and prev record in mysql

2007-05-11 Thread Richard Kurth
-Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Thursday, May 10, 2007 10:09 PM To: Richard Kurth Cc: php-general@lists.php.net Subject: Re: [PHP] finding next and prev record in mysql Richard Kurth wrote: How would I find the next id and the prev id in sql statement

RE: [PHP] finding next and prev record in mysql

2007-05-11 Thread Richard Kurth
-Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Thursday, May 10, 2007 10:09 PM To: Richard Kurth Cc: php-general@lists.php.net Subject: Re: [PHP] finding next and prev record in mysql Richard Kurth wrote: How would I find the next id and the prev id in sql statement

[PHP] finding next and prev record in mysql

2007-05-10 Thread Richard Kurth
How would I find the next id and the prev id in sql statement like the one below. The id number is not going to be in order so I can't do a or limit 1 on the search SELECT id FROM contacts WHERE category = '5' AND subcategory = '1' AND members_id= '8' ORDER BY lastname

Re: [PHP] finding next and prev record in mysql

2007-05-10 Thread Chris
Richard Kurth wrote: How would I find the next id and the prev id in sql statement like the one below. The id number is not going to be in order so I can't do a or limit 1 on the search SELECT id FROM contacts WHERE category = '5' AND subcategory = '1' AND members_id= '8' ORDER BY lastname