blueman378 Posted March 10, 2008 Share Posted March 10, 2008 hi guys i was wondering would a guery like this work: $query = "DELETE * FROM users,contacts,project WHERE id='$_SESSION[userid]' "; $result = mysql_query($query); thanks Quote Link to comment Share on other sites More sharing options...
haku Posted March 10, 2008 Share Posted March 10, 2008 http://www.haughin.com/2007/11/01/mysql-delete-across-multiple-tables-using-join/ Quote Link to comment Share on other sites More sharing options...
blueman378 Posted March 10, 2008 Author Share Posted March 10, 2008 yeah... im not exactly the best with joins, can someone please give me a example of how to delete * from the three tables where id = 1 (id is a consistant column on all 3 tables) cheers Quote Link to comment Share on other sites More sharing options...
Jabop Posted March 10, 2008 Share Posted March 10, 2008 $query = "DELETE * FROM users,contacts,project WHERE id='$_SESSION[userid]' "; $result = mysql_query($query); $query = "DELETE * FROM users WHERE ID='$_SESSION[userid]'"; $query = "DELETE * FROM contacts WHERE ID='$_SESSION[userid]'"; $query = "DELETE * FROM projects WHERE ID='$_SESSION[userid]'"; Quote Link to comment 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.