get all except 1

From: Date: Wed, 21 Jul 2004 01:17:28 +0000
Subject: get all except 1
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-191250@lists.php.net to get a copy of this message
Haven't done this in a while, but here is my question. I have 4 stories, and you land on the story page where one story is shown and on the side there is a listing of the other 3 stories that are active in that edition. So what I would like to do in one query is get the three that are not shown on that page. So can I do something like $story_sql="SELECT * FROM story WHERE approved = 1 AND editionId = $eid EXCEPT nid = $nid"; $nid is the id of the story whos detail page we are on Am I thinking correctly? dan mccullough tf: 866.298.3991 w: 603.444.9808 ________________________________ There is no such thing as a problem, unless the servers are on fire. Sometimes great opportunity comes brilliantly disguised as bad news.

« previous php.general (#191250) next »