Hi,
I am trying to delete several rows from two or even three tables in mysql.
I would like to do this in one select statement, and after reading the MySQL manual this is what I came up with:
delete salon_city, salon from salon_city, salon where salon_city.city_id='$my_id' and salon_city.city_id=salon.city_id
After extensive testing, I still can't get it to work, even though $my_id is correct, and corresponds to a feild in the database.
The error I get is:
error doing select 1064:You have an error in your SQL syntax near 'salon_city, salon from salon_city, salon where salon_city.city_id='10' and salon' at line 1
So there must be something wrong in my statement.. but I just can't figure it out.
Any help would be greatly appreciated!
Cheers.