Jump to content

Delete Query


Corbokhan

Recommended Posts

Hey everyone,

 

I'm having some trouble with a delete query that I can't quite figure out.

 

When I delete one item using the query, "DELETE FROM APPS where appID='1' AND userID='1';" the query works fine and the row is deleted.

 

When I delete one item at a time but use multiple queries the rows are not deleted. For example, I would call "DELETE FROM APPS where appID='1' AND userID='1';" and then "DELETE FROM APPS where appID='2' AND userID='1';" - Neither row is deleted.

 

Finally when I delete multiple items using one query , "DELETE FROM APPS where appID='1' OR appID='2' AND userID='1';" - Neither row is deleted.

 

Each of these queries work when I paste them directly into phpmyadmin, but not when using myslqi_query on a webpage.

 

Any ideas why these queries aren't running successfully?

 

[edit] Also, the queries that are not successfully running do not come back with an error message, they just do not perform the task.

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.