I am trying to delete from a few tables at once. I\'ve done a bit of research, and came up with this
DELETE FROM `pets` p,
`pets_activities` pa
-
I don't have a mysql database to test on at the moment, but have you tried specifying what to delete prior to the from clause? For example:
DELETE p, pa FROM `pets` p,
`pets_activities` pa
WHERE p.`order` > :order
AND p.`pet_id` = :pet_id
AND pa.`id` = p.`pet_id`
I think the syntax you used is limited to newer versions of mysql.
- 热议问题