I\'m trying to grab content where id = 3 OR id = 9 OR id = 100... Keep in mind, I can have a few hundred of these ids.
What is the most efficient way to write my q
You may want to use the IN() function:
... WHERE id IN (3, 9, 100);
The IN() function syntax:
IN()
expr IN (value,...) Check whether a value is within a set of values ... Returns 1 if expr is equal to any of the values in the IN list, else returns 0.
expr IN (value,...)
Check whether a value is within a set of values ...
Returns 1 if expr is equal to any of the values in the IN list, else returns 0.
1
expr
IN
0