Re:SQL AntiPatterns Presentation from MySQLConf 2009
by c0un7d0wn on Friday July 10, 2009 @03:23PM
(#698201)
You use a database that supports CTE or at the very least, recursive querying options, then you format your schema like so:
You then use a Common Table Expressions query, like this:
This returns a table with a calculated column called Level.
Which of course, would represent this tree:
[ Parent
| on HN ]
There are no comments on this comment yet.