best way to store and call this data

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
aravona
Forum Contributor
Posts: 347
Joined: Sat Jun 13, 2009 3:59 pm
Location: England

best way to store and call this data

Post by aravona »

Ok the data I need to create a table for and store is the following:

Object 1
prcode
colour 1 through to colour 7
prices 1 through 7

Object 2
prcode
colour 1 through to colour 10
prices 1 through 10

Object 3
prcode
Pack 1 through 4
prices 1 through 4
items in packs 1 through 4

Whats the best way to store these in a Database, and then be able to pull themup on a webpage in an array (so that 1 option can be selected of each object) I've not done normalisation and database structure for quite some time, and I would like the make this really simple.

The colours will be storing a filepath for an image, the Packs will store the name of the pack and a list of whats in it.

Given it a go and realised I'm jsut going to make a hash of it with no advice, I started with Object 1, adding prcode, colour1, price 1, colour2, price2 etc etc through til the end, all field names and realised this may just not work when it comes to pulling the information out on the page in an Array (which I am terrible at anyway!)

Any help would be awesome,

Cheers,

Aravona
DaiLaughing
Forum Commoner
Posts: 76
Joined: Thu Jul 16, 2009 8:03 am

Re: best way to store and call this data

Post by DaiLaughing »

I'm not sure I understand what you are wanting. Is it something like this:

productType ----> productVersion

where each product can have different packages/versions which include it?

If so the only problem then is the different information you need to hold about different types of product and package?

I can understand you not wanting to give too much information but can you clarify at all?
Post Reply