It’s a new year by Jewish calendar (and, incidently, today is the first day of the next 365 days). And what do I wish for in the following year?
- World peace
- Good health to all
- Support for ORDER BY & LIMIT in MySQL multi-table UPDATE and DELETE statements, This is sometimes a real show stopper!
Have a good year / next 12 months everyone!
I have a user-variable abusing method for Multi-table delete + LIMIT. I think I’ve only tested it for deleting from one table, but where that table needs to be joined to other tables.
Oh, I forgot that I blogged about that before:
http://swanhart.livejournal.com/120806.html
Amen to that! 🙂
@Justin: thanks for the reference!
@Justin,
As another note: there is a problem with applying your solution, which does not (and cannot) use ORDER BY, since queries become replication-unsafe.
Actually, it may not bee such a problem if you want to do complete query is smaller chunks, in which case the ORDER does not really matter, replication-wise. But I can still see it leading to issues if new rows are added which match the DELETE/UPDATE WHERE condition.