gpt4 book ai didi

php - MySql 删除不工作

转载 作者:太空宇宙 更新时间:2023-11-03 11:46:44 25 4
gpt4 key购买 nike

我有一个 mysql 删除脚本,它给我一个错误:

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 'LEFT JOIN mall ON mall.m_id = unifo.mids WHERE mallnames = 'My Mall'' at line 2

删除查询:

DELETE FROM unifo 
LEFT JOIN mall ON mall.m_id = unifo.mids
WHERE mallnames = 'My Mall' && time_insert < NOW( ) - INTERVAL 25
MINUTE

我找不到我的错误

最佳答案

你在这个查询中有一个基本问题

DELETE FROM unifo 
LEFT JOIN mall ON mall.m_id = unifo.mids
WHERE mallnames = 'My Mall' && time_insert < NOW( ) - INTERVAL 25
MINUTE

你对 mall 表执行左连接,然后根据 mall 值你要删除一些东西,但在左连接中 mallname 可以为 null 没有左连接的意义

2 指定表

从 unifo 中删除 unifo ....

关于php - MySql 删除不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38166433/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com