I am doing a little fake project to help me learn php basics. It's supposed to just be a small online sotre selling some product, consists of about 5 different product ranges and each has a dynamically generated product gallery with thumbnails of all the products in that range. You can click one and if so up pops a detail.php window with a bigger version image and detail for that product:
See the "sizes available" bit, i would like that to only show as many rows as there are sizes available for that particular product? but this make the database more complicated doesn't it?
the only way i can see it is if i have a table just for sizes available and that each and every size is it's own row. Here is what i am thinking for the database table layout:
product_collection
collectionID [ INT(2) ]
collectionName [ TINYTEXT ]
products
productID [ INT(2) ]
productName [ TINYTEXT ]
productImage [ TINYTEXT ]
productNumber [ TINYTEXT ]
collection [ INT(2) ]
sizes
sizeID [ INT(2) ]
size [ TINYTEXT ]
product [ INT(2) ]
So that means if there are 4 different sizes available for a particular it will have 4 entires (rows) in the "sizes" table.
what do you think of this?
mat,