Dynamically building categories - where to start?
Posted: Sat Apr 02, 2005 8:30 am
Hi
Im after some help because I can't figure out the best way to go about this.
I have 2 tables in a database, products and category_map.
In the product table is a comma seperated field for the categories (i.e. 234,345,567 - for multiple category entries).
I have seperated these using explode, but what I want to do is build a category list based on the names in the category_map field which relate to the numeric values in the product table. The category_map already holds the numeric values.
To complicate things the category_map has 3 fields, id, descr, and mastid.
id = the numeric value as in the products table
descr = description
mastid = master category id (for child categories)
Any and all pointers/tutorial links/code snippets would be most welcome.
Thanks in advance.
Lyndon
Im after some help because I can't figure out the best way to go about this.
I have 2 tables in a database, products and category_map.
In the product table is a comma seperated field for the categories (i.e. 234,345,567 - for multiple category entries).
I have seperated these using explode, but what I want to do is build a category list based on the names in the category_map field which relate to the numeric values in the product table. The category_map already holds the numeric values.
To complicate things the category_map has 3 fields, id, descr, and mastid.
id = the numeric value as in the products table
descr = description
mastid = master category id (for child categories)
Any and all pointers/tutorial links/code snippets would be most welcome.
Thanks in advance.
Lyndon