homepage Welcome to WebmasterWorld Guest from 54.196.63.93
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

    
how to manage products with different flags?
PHPycho

5+ Year Member



 
Msg#: 4085389 posted 8:03 am on Feb 23, 2010 (gmt 0)

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?

 

LifeinAsia

WebmasterWorld Administrator lifeinasia us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 4085389 posted 4:21 pm on Feb 23, 2010 (gmt 0)

I use both. If it's something I planned for from the beginning (like featured), I'll have a field in the main table. If it's something I decided to add later (like Christmas Specials), and the main table is pretty big, I'll probably make a separate table.

Demaestro

WebmasterWorld Senior Member demaestro us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4085389 posted 6:22 pm on Feb 25, 2010 (gmt 0)

If there will only be 1 flag active at anytime then I would have flag details stored in a seperate table and then store the flag_id in a column on the main table.

Products:
prod_id, prod_name, flag_id

Flags:
flag_id, flag_name, flag_desc

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved