mikey3521 Posted June 17, 2007 Share Posted June 17, 2007 Hello, I've been able to delete rows from one table successfully but what I want to try next is giving me some problems. I have a users 'id' which is unique. Heres what I want to-do. DELETE * FROM users WHERE id = 1 DELETE * FROM messages WHERE from = 1 DELETE * FROM comments WHERE user = 1 In each table there oginizaed a little different hense the id , from & user... but thats what I want to-do, without having to-do them all sepreatly, would like it to be efficent. the users ID will be passed along as the var 'id' any thoughts? So pretty much it takes the users id number and deletes them from each table. Quote Link to comment https://forums.phpfreaks.com/topic/55910-mysql-multitable-delete/ Share on other sites More sharing options...
trq Posted June 17, 2007 Share Posted June 17, 2007 You'll need to execute your queries individually unfortunately. PHP's mysql extension does not support the execution of multiple queries. Quote Link to comment https://forums.phpfreaks.com/topic/55910-mysql-multitable-delete/#findComment-276160 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.