I have a database table with categories for different products in it. Each category has only one parent and each product can have multiple categories. I need to build a sort of breadcrumb navigation for a data migration, but can't figure out how to map the data so that I don't have tonds of queries.
The database is setup like so:
id category sort parent
1 Home 0 0
58 Car & Truck 4 1
135 10' Wide Shelters 0 58
Now I need to get the data back like this: Home/Car & Truck/10' Wide Shelters
.
Is this possible with pure SQL or do I need to mix-in ColdFusion to get it. If I can do this with pure SQL then how would I do that, and if I can't then what would the ColdFusion look like?