I am using the following query:
SELECT foo, bar FROM mytable WHERE foo=:foo AND userid=:userid;
I want to loose the AND userid=:userid
part for 'admin' class users (they get to see the foo
s of all users).
Is there a way to do that using PDO prepared statements? Or am I to use string concatenation to create two different queries? I was thinking of using some kind of LIKE
structure also, but it feels a little lumpy.