News for hackers. Stuff that matters.
Re:SQL as an API language by verbify on Friday October 05, 2018 @08:39AM (#18147617)
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?

Re:SQL as an API language by aaaaaaaaaab on Friday October 05, 2018 @10:52PM (#18153225)
Yeah, I forgot the ORDER BY clause, but you get the idea.