When I run this:
DELETE FROM folders AS fo
LEFT OUTER JOIN files AS fi
ON fo.folderId = fi.folderId
WHERE fi.folderId IS NULL AND (fo.folderId IN (63,1000))
... I get a syntax error:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS fo LEFT OUTER JOIN files AS fi ON fo.folderId = fi.folderId WHERE fi.fold' at line 1
The code is based in a SELECT query that returns the intended rows. What's the reason for the error message?