Simplifying a WHERE clause
Posted: Tue Feb 24, 2009 3:07 pm
(MYSQL) - Is there a way to simplify or use a shortcut on multiple OR operators in a WHERE clause?
Instead of:
A way to combine those four fields into one big "OR"?
(Also, same question for REGEXP instead of "="?)
Instead of:
Code: Select all
WHERE field1 = '$x' OR field2 = '$x' OR field3 = '$x' OR field4 = '$x'(Also, same question for REGEXP instead of "="?)