Click to See Complete Forum and Search --> : Query same column twice


mdkbam
04-02-2007, 05:49 AM
Hi, I'm pretty sure that I've missed something obvious but I can't think of what it is, I need to get rows where "forid" is 0 and 1 but I can't think of how to do it, I tried:

SELECT * FROM `events` WHERE `forid` = '0' AND `forid` = '1'

But that query isn't correct.

Appreciate any help, thanks.

buntine
04-02-2007, 07:37 AM
Yes, the logic is non-existant!

Perhaps you are trying to fetch rows where "forid" is 0 OR 1?

SELECT * FROM Events WHERE forid=0 OR forid=1;

Cheers,
Andrew.