How can I use "&" in my SQL query without it breaking?
Here is my SQL query which works great unless there is '&' in value2
.
$sql = "SELEC开发者_开发技巧T * FROM isproducts WHERE title = 'LBD - ".$value2."' AND ProductGroupCode = 'WEB' LIMIT 1";
Is this a known issue which I don't know about? Is there a workaround?
$sql = "SELECT * FROM isproducts WHERE title = 'LBD - ".mysql_real_escape_string($value2)."' AND ProductGroupCode = 'WEB' LIMIT 1";
精彩评论