Is there any difference between:
SELECT * FROM users WHERE username=\"davyjones\"
and
SELECT * FROM users WHERE username LI
In that case, there is no difference that would come up in the results. However, it uses a different method for comparision, and the "LIKE" would be much slower.
Check out this for examples of LIKE : http://www.techonthenet.com/sql/like.php
In this case, you still want to use the equals.
Update: Note that there is a crucial difference when it comes to CHAR type columns in which the results will be different. See this answer for more details. When using VARCHAR (presumably the norm), the above are equivalent and equals is to be preferred.