<snip>
Or just a string "Main2/Child2-1/Child2-2-1"...

Any ideas? Are they just rumours that this cannot be made with MySQL without
any accessories, PHP etc?
</snip>

The problem I had with trying to implement this type of solution for a
threaded discussion app was in 'most recent' sorting.  I want the Parent to
appear first, in descending order by date, but with the children in
ascending date order under their appropriate parent.  I could only
accomplish it with multiple queries (one to get the parents, then an
additional query at each Parent level to get the children.  I did this with
ASP - I'd like to see more of the functionality moved into the SQL.

Note: My solution is very similar to your solution, but with a 'SortKey'
field like your Child naming which basically chases the thread from top to
bottom.  I use a flag to indicate Parents.

OK, so now we know how to do it inefficiently (my way) - Gurus, any ideas?

Jay Fesco


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to