Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的数据库中,我想使用 PHP 脚本删除日期字段为 < 当前日期的行。
$date('Y-m-j'); $result = mysql_query("DELETE * FROM festival WHERE day = '$date'");
出于同样的原因,DELETE 不起作用。使用 SELECT 执行相同的查询。Perarps 是由于一些关于 DELETE 命令的权限?
您的 SQL 语法不正确。DELETE 查询不采用列列表,但您试图将其传递给它(as *)。
*
您的查询应该是:
DELETE FROM festival WHERE date = '$date'