Drop the ORDER BY
+ LIMIT
, or the JOIN
, and everything is peaches. Put them together and I seem to release the Kraken. Anyone who can shed some light?
DELETE table1 AS t1
FROM table1 AS t1 LEFT JOIN table2 AS t2 ON t1.id = t2.id
WHERE t2.field = 'something'
ORDER BY t1.id DESC
LIMIT 5
I've also tried it without aliases & dropping the WHERE
, to no avail. Always a syntax error "near 'ORDER BY...
".