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. 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. 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
Archived
This topic is now archived and is closed to further replies.