What\'s the difference between
SELECT foo FROM bar WHERE foobar=\'$foo\'
AND
SELECT foo FROM bar WHERE foobar LIKE\'$foo\'
LIKE can do wildcard matching:
SELECT foo FROM bar WHERE foobar LIKE "Foo%"
If you don't need pattern matching, then use = instead of LIKE. It's faster and more secure. (You are using parameterized queries, right?)