Page 1 of 1

how to manage products with different flags??

Posted: Tue Feb 23, 2010 1:59 am
by PHPycho
How do you handle product with different flags like featured, new, christmas special, valentine special..?

do you use fields in the same product table (sayroducts)
or different table
But How?

Re: how to manage products with different flags??

Posted: Tue Feb 23, 2010 2:04 am
by Benjamin
You can use the "Entity Attribute Value" database model. Essentially you would create a separate table which stores the product id, attribute name and the attribute value.

http://en.wikipedia.org/wiki/Entity-att ... alue_model

Re: how to manage products with different flags??

Posted: Tue Feb 23, 2010 2:05 am
by Luke
Dude, I don't mean to be rude, but I don't think I've ever seen a question that makes less sense than this. I think I can speak for the entire PHP developer's network when I say...

WHAT?? :? :? :?

Re: how to manage products with different flags??

Posted: Tue Feb 23, 2010 2:48 am
by PHPycho
@Luke: Can you elaborate??
Why my question doesn't make much sense???

Re: how to manage products with different flags??

Posted: Tue Feb 23, 2010 6:15 am
by VladSun
I am not a fan of EAV, so I'd suggest using either a bitmask field into the table itself, or using two additional tables - flag and product_has_many_flags table.