Hi folks, I've got a question hopefully someone can shed some light on for

I'm building an online store for a client, and one of the things he wants is
to organize his products into categories and subcategories.. not so unusual,
but the kicker is he wants to be able to associate a subcategory with more
than one category.

I was thinking that I should be able to easily serialize an array of cat_IDs
and store it, but my concern is that this will sacrifice a great deal of
flexibility when retrieving the data. For instance when I want to get the
subcategories in a single category, I would pretty much have to select ALL
the rows in the subcategory table, unserialize the category array for each
row, and then check each to see if the cat_ID is in the array..?

That just feels inefficient to me, and I'm almost certain I must be
overlooking something simpler..

Also, I don't think I can use a SET data type because I want to be able to
add values to the set (categories) dynamically in the future. But maybe I'm
wrong and there is a way to do that...?

Anyway I thought I'd throw it to those more experienced than me before I
started coding. Anyone have any ideas?

Thanks in advance,

Corey Eiseman
Infinite Orange Incorporated

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to