I have this query:
UPDATE users u
LEFT JOIN events e ON e.author_id = u.id
SET u.events = 0, e.seen = 1
WHERE u.id = ?
... ON e.author_id = u.id
You can't do that in MySQL, because MySQL doesn't support
FULL OUTER JOIN.
But why not just run two update statements:
UPDATE users u SET u.events = 0 WHERE u.id = ?; UPDATE events e e.seen = 1 WHERE e.author_id = ?;
You can wrap these in a transaction, if you think the transactional semantics are important and your storage engine supports transactions.