in reply to Message Board Threading with DBI/MySQL
Then you only need one select to pull them all in. You will still need to sort out the hierarchical relationships, but you've got parent_id, level_id, etc. in the table already.
Any benchmarking you do will indicate that one sql select is as slow as executing several hundred (if not thousand) lines of procedural code. The slight amount of thrashing in perl to sort things is more than made up for by eliminating all but the one select.
|
|---|