Thread: Storing prices
View Single Post
Old 11-07-2012, 10:36 AM   PM User | #8
LearningCoder
Regular Coder

 
LearningCoder's Avatar
 
Join Date: Jan 2011
Location: The Pleiades
Posts: 849
Thanks: 67
Thanked 28 Times in 28 Posts
LearningCoder is an unknown quantity at this point
Just had another question come to me which relates to this very same database....

Here is my table structure:
Code:
products (

   productID(int)PK A-I
   product_img(varchar 40)
   product_name(varchar 40) 
   product_details(text)
   product_price(DECIMAL 11,2)

)
Because I may have various images of the same product, would it be best to create individual tables for the products, so that if the user wants to just view 'pet housing' for instance, it would be easier to select all the data relating to pet housing.

OR

Can I create an extra field within my original table, for example 'tags', and just insert ALL products into this table, but give them certain tags when doing so. This is so I can determine which products to display using the tag field.

Please let me know your thoughts because I'm stuck and can't carry on without knowing the best way to go about this.

Thank you for any help

Kind regards,

LC.
LearningCoder is offline   Reply With Quote