Reputation: 1481
I found a comments query example on this site that works with perfectly with my current DB structure.
Link : How to make comment reply query in MYSQL?
The accepted answer works, but I was wondering if it was possible to reverse the order so the newest comments show up first?
SELECT *
FROM comments
ORDER BY IF(ParentId = 0, Id, ParentId), Id
I tried "desc" in the query, but that messes up parent / child comment sorting.
Upvotes: 2
Views: 791