4 ms·
Nice bit of code. Just to clarify, wouldn't you need to order by parent_id for the row["parent.id"] != results.last.id to work? Otherwise, say you're ordering
by verbify 8y ago
Nice bit of code.
Just to clarify, wouldn't you need to order by parent_id for the row["parent.id"] != results.last.id to work? Otherwise, say you're ordering by child.date_modified, you could end up with two identical parent_ids in your array?
- aaaaaaaaaab 8y agoYeah, I forgot the ORDER BY clause, but you get the idea.