开发者

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";
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜