As an example I have a table like this:
folder_id | parent_folder_id | folder_name
------------------------------------------
1 | null | Main
2 | null | Departments
3 | null | Archived
4 | 2 | IT
5 | 2 | Sales
6 | 4 | Error Logs
7 | 6 | 2012
etc...
I need to run a query (if multiple thats ok too) to be able to loop through and display them properly via Coldfusion.
I need it to display like this:
- Main
- Departments
- IT
- Error Logs
- 2012
- Error Logs
- Sales
- IT
- Archived
...etc... Going as deep as a user creates them.
I'm just having a hard time trying to understand the logic of how this is going to work. Thanks for any help!