I have a mySQL database containing items that are categorised four levels deep.
when I'm getting the data out (in a tree structure) I'm nesting SQL queries inside array traversing loops (select distinct category, while $row= echo stuff select distinct subcat, while $row= echo stuff etc) I'm sure this isn't the best way and I oought to be selecting all the items and then doing some sort of sorting and then traversing the whole lot, doing one thing until the category changes and then doing something else until the category changes again and so on. can anyone point me to a tutorial that would help me switch from nested select statements to something more elegant? Thanks Tony -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php