我试图更新多个表:
UPDATE fund_people, shop_info, volun_db, adopt_db
SET shop_info.shelter_id = '2',
fund_people.shelter_id = '2',
volun_db.shelter_id = '2',
adopt_db.shelter_id = '2'
WHERE fund_people.shelter = 'Pesaleidja (Estonia)'
AND shop_info.shelter = 'Pesaleidja (Estonia)'
AND volun_db.shelter_name = 'Pesaleidja (Estonia)'
AND adopt_db.shelter_name = 'Pesaleidja (Estonia)'
尝试使用phpmyadmin,查询运行时没有任何错误,但表没有更新。
如果使用单个查询,请执行以下操作:
UPDATE shop_info SET shelter_id = '2' WHERE shelter = 'Pesaleidja (Estonia)'
它工作正常并更新表。我做错了什么?如何使用一个查询更新表?
抱歉我的英文。