I want to remove certain items from the database. I have the following query:
SELECT * FROM sheets, entries WHERE entries.sheetID = sheets.id AND sheets.clientID = 13
This works and returns 2 results.
Now I want to turn this SELECT query into a DELETE query. However, the following does not work:
DELETE FROM sheets, entries WHERE entries.sheetID = sheets.id AND sheets.clientID = 13
MySQL produces the following error:
1064 - You have an error in the SQL syntax; check the manual that matches your MySQL server version for the correct syntax to use near 'WHERE entries.sheetID = sheets.id AND sheets.clientID = 13' at line 1
What am I doing wrong here?
source share