从我的 SQL 数据中删除数据时遇到问题。我尝试了各种版本的声明,但无济于事。以下是我遇到的错误和我正在使用的语句。
$sql = "DELETE FROM `saved_holidays` WHERE (subscriberID= $user AND title= $check_value)";
//connect to database then execute the SQL statement.
$db->exec($sql);
错误信息是:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@xml119.com AND title= Luxurious Jamaican holidays | 40% Discount On Accommodati' at line 1
我可以看到正在传递正确的数据,但语法错误。任何人都可以帮忙吗?