我在sql查询中遇到特殊字符问题。我尝试使用{},mysqli_escape进行转义,但它不起作用。
我的查询看起来像这样....
("SELECT * FROM cars WHERE car_id= '$carid' AND car_des='$car_des' AND engine= 'B' ");
$carid = 123;
$car_des = Toyota <'kk'>;
所以我的查询内容如下
("SELECT * FROM cars WHERE car_id= '123' AND car_des='Toyota <'kk'>' AND engine= 'B' ");