sspoke Posted September 5, 2007 Share Posted September 5, 2007 i know how to do this now with UPDATE/SELECT's but not im sure why it doesn't compile with DELETE FROM. /** failures */ DELETE FROM `user_invitems` AS l USING `user_credentials` AS c WHERE l.id = c.id AND c.name = 'testing123' DELETE FROM `user_invitems` AS l, `user_credentials` AS c WHERE l.id = c.id AND c.name = 'testing123' DELETE FROM `user_invitems` AS l, `user_credentials` AS c AS l.id = c.id AND c.name = 'testing123' using 2 tables 1 to pick name from and match its id row to a different tables row. also another question relating speed its really odd on the working UPDATE/SELECT which is exactly like DELETE FORM except it works.. for some reason those UPDATE/SELECT process for this took around 0.0130 secs to get id from a different table and do its process which is alot more compared to normal SELECT/UPDATEs on a preset id which are like 0.0020 secs Link to comment https://forums.phpfreaks.com/topic/67981-solved-delete-from-help-plz/ Share on other sites More sharing options...
sspoke Posted September 5, 2007 Author Share Posted September 5, 2007 did more research and tried DELETE `user_invitems` FROM `user_invitems` AS l, `user_credentials` AS c WHERE l.id = c.id AND c.name = 'testing123' didn't work.. can't edit topics srry Link to comment https://forums.phpfreaks.com/topic/67981-solved-delete-from-help-plz/#findComment-341782 Share on other sites More sharing options...
teng84 Posted September 5, 2007 Share Posted September 5, 2007 delete from tablename where field =condition thats all!!!!!! Link to comment https://forums.phpfreaks.com/topic/67981-solved-delete-from-help-plz/#findComment-341792 Share on other sites More sharing options...
sspoke Posted September 5, 2007 Author Share Posted September 5, 2007 delete from tablename where field =condition thats all!!!!!! No.. I know that.. im talking about SELECT + DELETE in one DELETE. Link to comment https://forums.phpfreaks.com/topic/67981-solved-delete-from-help-plz/#findComment-341804 Share on other sites More sharing options...
teng84 Posted September 5, 2007 Share Posted September 5, 2007 delete from tablename where fieldtobedeleted in(select form tbale where condition)???? Link to comment https://forums.phpfreaks.com/topic/67981-solved-delete-from-help-plz/#findComment-341805 Share on other sites More sharing options...
sspoke Posted September 5, 2007 Author Share Posted September 5, 2007 and how can I do what u said? ??? ? DELETE FROM `user_invitems` AS l, `user_credentials` AS c WHERE l.id = c.id IN c.name = 'testing123' ? remember I can't delete user_invitems without only deleting the linked ID's to user_credentials by name.. Link to comment https://forums.phpfreaks.com/topic/67981-solved-delete-from-help-plz/#findComment-341811 Share on other sites More sharing options...
teng84 Posted September 5, 2007 Share Posted September 5, 2007 do something like a Cartesian join http://dev.mysql.com/doc/refman/5.0/en/delete.html Link to comment https://forums.phpfreaks.com/topic/67981-solved-delete-from-help-plz/#findComment-341815 Share on other sites More sharing options...
sspoke Posted September 5, 2007 Author Share Posted September 5, 2007 yah thats no help.. at all.. Link to comment https://forums.phpfreaks.com/topic/67981-solved-delete-from-help-plz/#findComment-342313 Share on other sites More sharing options...
fenway Posted September 7, 2007 Share Posted September 7, 2007 yah thats no help.. at all.. Did you get this figured out? There was a lot of nonsense posted on this thread.... Link to comment https://forums.phpfreaks.com/topic/67981-solved-delete-from-help-plz/#findComment-343924 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.