phpycho — 2010-02-23T02:44:34-05:00 — #1
How do you handle product with different flags like featured, new, christmas special, valentine special..?
do you use fields in the same product table (say:products)
or different table
r937 — 2010-02-23T05:14:19-05:00 — #2
there are lots of ways to do it
how many flags do you gots? you mentioned 4, is that all?
phpycho — 2010-02-23T06:21:25-05:00 — #3
r937 — 2010-02-23T09:12:45-05:00 — #4
phpycho — 2010-02-24T06:18:52-05:00 — #5
@rudy: i didn't get you.
What i mean to say is that there may be no of flags (not fixed)?
I think my question is clear.
r937 — 2010-02-24T13:22:52-05:00 — #6
okay, in that case, set up a product_attributes table...
CREATE TABLE product_attributes
( product_id INTEGER NOT NULL
, attr_name VARCHAR(99) NOT NULL
, attr_value VARCHAR(99) NOT NULL
, PRIMARY KEY ( product_id , attr_name )
now please do a little research and look up entity-attribute-value (EAV) to see how horribly difficult this scheme really is