Thanks guys, I knew it was a stupid Q when I sent it, but I had another
one where I encapsulated them in () blow up on me, so I figured if I
asked and it was the same answer then I was on the right track.

And so far all the tests have shown positive.  :)

Wolf


> More of a MySQL question, but easily enough answered;
> 
> Always group the OR with parenthese and the AND individually. Write the
> query and test with MySQL before placing into PHP code;
> 
> SELECT * FROM `table`
> WHERE (`foo` = 'bar' 
>    OR `foo` = 'glorp'
>    OR `sqirk` = 'glorp')
> AND `today` = CURDATE()
> AND `userID` = 'Marvin'
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to