1
2
3
4
5
6
7
DELETE u, up, upc, ut, utp
FROM users AS u
LEFT JOIN users_photos AS up ON up.user_id = u.id
LEFT JOIN users_photos_comments AS upc ON upc.photo_id = up.id
LEFT JOIN users_topics AS ut ON ut.user_id = u.id
LEFT JOIN users_topic_posts AS utp ON utp.topic_id = ut.id
WHERE u.id = 12