我需要编辑这段代码:
UPDATE favorites SET category='$newcat',subcategory='$newsubcat',
sitename='$newwebsitename',
url='$newwebsiteurl' WHERE email='$email' ORDER BY favoritesid ASC LIMIT 1
添加: 'OFFSET 1' 到最后,但由于 UPDATE 不允许该OFFSET
命令,我需要使用 anINNER JOIN
添加该部分。但是我只知道在删除单个变量时如何执行此操作,例如:
DELETE a FROM favorites a
INNER JOIN
(
SELECT favoritesid
FROM favorites
WHERE email = '$email'
ORDER BY favoritesid
LIMIT 1 OFFSET x
) b ON a.favoritesid = b.favoritesid
但是当更新多个变量时,我什至不知道从哪里开始。谁能帮我吗?