missyevil Posted April 26, 2006 Share Posted April 26, 2006 Hi!Basically I want to delete entries from 3 tables - table1, table2 and linktable.I have something along the lines of:[code]DELETE FROM table1, table2, linktable WHERE linktable.id1=table1.id AND linktable.id2=table2.id[/code]BUT, I'm getting syntax errors returned.I'm very new to MySQL and PHP, so sorry if this is a really stupid question! Any help much appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/8451-deleteing-linked-rows-from-multiple-tables/ Share on other sites More sharing options...
fenway Posted April 27, 2006 Share Posted April 27, 2006 There are a number of ways to handle multi-table deletes -- you want want to look at the other syntax in the refman; also consider using JOINs. Quote Link to comment https://forums.phpfreaks.com/topic/8451-deleteing-linked-rows-from-multiple-tables/#findComment-31190 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.