Hi I have a table called "sections" with the following structure:
+-----------+------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------+------------+------+-----+---------+----------------+ | secid | int(11) | | PRI | NULL | auto_increment | | title | mediumtext | | | | | | body | longtext | | | | | | parentid | int(5) | | | 0 | | | treelevel | int(5) | | | 0 | | | ord | int(11) | | | 0 | | | layoutid | int(11) | | | 0 | | | accessid | int(11) | | | 0 | | +-----------+------------+------+-----+---------+----------------+ I uses the parentid and the treelevel to determine whether it is a section, subsection, sub sub section and so on. Would anyone know of a query that would allow me to find a section and all it's subsections and all the subsections subsections down to lowest level in one go? Thanks for any help in advance Regards Andy Barnes -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]