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
https://forums.phpfreaks.com/topic/235397-delete-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.