mysql query
| From: | Sebastian | Date: | Fri, 18 Feb 2005 00:24:50 +0000 |
| Subject: | mysql query | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-208977@lists.php.net to get a copy of this message | ||
Hello,
im working on an article system and looking to avoid running three queries.
example, i have this query:
SELECT id,title FROM articles WHERE id=$_GET[id]
now say $_GET[id] = 5
I would like to get the previous id 4 and the next id 6 (if there is one)
so i can do something like:
<< Previous Article [Title]
Next Article [Ttitle] >>
i would assume this is impossible without running mulitple queries? just
thought i'd ask in case i am wrong. i am using mysql 4x
thanks