Hi,
I have a MySQL query that is my PHP search function. If I search for Rock or Rap it works fine. But as soon as I try to search for R&B it displays everything with a "R" in it. I understand that it is the "&" operators fault. It is performing some Bitwise operation on the search query. How can I escape the "&" operator and find only titles of the R&B genre.
Here is the query:
$query = sprintf("SELECT * FROM library WHERE `genre` LIKE '%s'",mysql_real_escape_string($search);
I appriciate your help. Thanks.