我有一组 GUID:
Array
(
[0] => 1770302746_580821208_2068022554_1652435499
[1] => 595039408_884272175_1344680100_1997277231
...
)
我将其内爆为逗号分隔的字符串*:
1770302746_580821208_2068022554_1652435499,595039408_884272175_1344680100_1997277231
然后我将其传递给 sql DELETE 语句:
$q=$conn->prepare(" DELETE FROM su_posts_att_sort WHERE FileGUID IN ({$GUIDs}) ");
$q->execute();
但是,不会删除任何行。放置 try / catch 块以返回任何异常并没有引发任何异常。谁能让我知道我哪里出错了?
*还尝试过用双引号括起来的每个 GUID。
编辑 这是提交的sql:
DELETE FROM su_posts_att_sort WHERE FileGUID IN ('1770302746_580821208_2068022554_1652435499','595039408_884272175_1344680100_1997277231')
通过控制台工作正常...