如何通过 mysql 的一个查询删除 2 行
how to delete 2 rows with one query with mysql
大家好,我如何从一个 table 的一个查询中删除 2 行。我的代码是:
DELETE FROM panel_friends
WHERE friends_friend_id = ' . $k . ' AND friends_member_id = ' . $key2
AND
WHERE friends_friend_id = ' . $k2 . ' AND friends_member_id = ' . $key
DELETE
FROM panel_friends
WHERE (friends_friend_id = :k1 AND friends_member_id = :k2)
OR
(friends_friend_id = :k2 AND friends_member_id = :k1)
大家好,我如何从一个 table 的一个查询中删除 2 行。我的代码是:
DELETE FROM panel_friends
WHERE friends_friend_id = ' . $k . ' AND friends_member_id = ' . $key2
AND
WHERE friends_friend_id = ' . $k2 . ' AND friends_member_id = ' . $key
DELETE
FROM panel_friends
WHERE (friends_friend_id = :k1 AND friends_member_id = :k2)
OR
(friends_friend_id = :k2 AND friends_member_id = :k1)