What\'s the difference between
SELECT foo FROM bar WHERE foobar=\'$foo\'
AND
SELECT foo FROM bar WHERE foobar LIKE\'$foo\'
In your example, they are semantically equal and should return the same output.
However, LIKE will give you the ability of pattern matching with wildcards.
You should also note that = might give you a performance boost on some systems, so if you are for instance, searching for an exakt number, = would be the prefered method.