Jump to content

[SOLVED] DELETE FROM help plz


sspoke

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.