yup, thanks Vincent -
I think I was getting confused with how to store arrays -
I think I'll stay with my current mysql setup -
d.dept_id
d.dept_name
c.cat_id
c.cat_name
c.dept_id
to use two tables to link categories to departments - I was wanting to perhaps be more slik with 1 table
d.dept_id
d.dept_name
d.categories
where d.categories stored c.cat_id and c.cat_name in an array.
The only reason I thought of doing this is because I'm up to c.cat_id #800, and have to index 3 fields - if I could have stored categories in an array, I could have gotten away with 2 indices, and d.categories[cat_id] numbers of <20.
So to store an array, it must first be imploded, with, say a " | " delimiter? I ask because my products can belong to more than one department/category combination - at present I have my products table classified with a $class_id field, where the numbers,
eg 4.12 | 10.115
class the product as belonging to
dept_id 4 / cat_id 12
AND
dept_id 10 / category_id 115
you see how my category id's are building up, even though there are only 8 categories in department 10.
Does this make any sense? if so, am I heading in the right direction or going to come a cropper some time in the future?
Thanks