Forums
 This topic is locked 
             Where clause help
 Posted 20 Apr 2005  17:39:01 
  1 
     has   voted 
  20 Apr 2005  17:39:01 Matt Bailey posted: 
 Is it possible to put two parameters in a where clause? I want to check for two ID numbers in my where clause, not just one. Here's a couple of examples of what I've tried, but I can't get it to work:WHERE MyTable.MyID = 3,5
or
WHERE MyTable.MyID = 3 AND MyTable.MyID = 5
The second example doesn't throw up any errors, but I don't get any data. Can anyone point me in the right direction?
___________________________________
* Sorry... how do you do that again?... *
Edited by - matm00 on 20 Apr 2005 17:41:24
Replies
 Replied 20 Apr 2005  17:44:32 
   20 Apr 2005  17:44:32 Matt Bailey replied: 
  Ah... I've figured it out. What a dumbass! - none of my records have an ID of 3 AND 5. They are either 3 OR 5. This works:
WHERE MyTable.MyID = 3 OR MyTable.MyID = 5
I should slow down and think for a moment before I post!
___________________________________
* Sorry... how do you do that again?... *
  WHERE MyTable.MyID = 3 OR MyTable.MyID = 5
I should slow down and think for a moment before I post!
___________________________________
* Sorry... how do you do that again?... *
