TylorFamous
03-24-2008, 05:02 PM
Hello,
I am very new to MYSQL and Php working with flash and I just had a some questions about databases and stuff. I have made some stuff where php and flash can “talk” to each other to get information from a MYSQL database. But I am working on a project that includes dressing up a character (and the clothing choices are going to be saved into a mysql database). Right now I would have a table named Clothing and then have fields named Hat and Shirt and so on. Once people started to save their clothing into the database it would start to look like this:
Hat: Pink Flower Hat
Shirt: Red shirt
Pants: Blue Jeans
...And so on. This would work fine for me but I end up with a ton of fields, all related to the clothes.
My Question is this:
Can I just store all of the clothing information into ONE field? And have it look something like:
Clothing:
Hat=pink_flower_hat&shirt=Red_shirt&pants=blue_jeans
Or however I would store them. Would it be considered bad practice to store all of the clothing information into one field? Or should I just end up with a thousand little fields? I am just asking because I don't know how I should set it up. I imagine with sites like Webkinz where you would have an inventory you would store all the information in ONE field? Maybe I am wrong but I would love to know either way. Thanks for any help!
Thanks for any advice on “proper database storing”
I am very new to MYSQL and Php working with flash and I just had a some questions about databases and stuff. I have made some stuff where php and flash can “talk” to each other to get information from a MYSQL database. But I am working on a project that includes dressing up a character (and the clothing choices are going to be saved into a mysql database). Right now I would have a table named Clothing and then have fields named Hat and Shirt and so on. Once people started to save their clothing into the database it would start to look like this:
Hat: Pink Flower Hat
Shirt: Red shirt
Pants: Blue Jeans
...And so on. This would work fine for me but I end up with a ton of fields, all related to the clothes.
My Question is this:
Can I just store all of the clothing information into ONE field? And have it look something like:
Clothing:
Hat=pink_flower_hat&shirt=Red_shirt&pants=blue_jeans
Or however I would store them. Would it be considered bad practice to store all of the clothing information into one field? Or should I just end up with a thousand little fields? I am just asking because I don't know how I should set it up. I imagine with sites like Webkinz where you would have an inventory you would store all the information in ONE field? Maybe I am wrong but I would love to know either way. Thanks for any help!
Thanks for any advice on “proper database storing”