From: "schwingenschloegl jan" <[EMAIL PROTECTED]> > >i wonder if its possible to perform multiple WHERE statements in one > >mysql SELECT statement like: > > > >SELECT * FROM table WHERE field1=3D'one' AND field2=3D'two' OR > >field3=3D'three'; > > > >it works with as many AND and > >it works with OR but not together > > > >is there something like brackets or other logical opertators
Yes, parentheses work fine. This should help you out: SELECT * FROM table WHERE (field1=3D'one' AND field2=3D'two') OR field3=3D'three'; -- denonymous www.coldcircuit.net denonymous.ne.mediaone.net --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php