dodgyJim
-
Posts
4 -
Joined
-
Last visited
Never
Posts posted by dodgyJim
-
-
Hi all,
Having a few issues trying to work out the best way to set this db up.
I am still fairly new to it all so maybe I am trying to analyze this too hard...you know, can't see the forest for the trees etc.
[b]General Product Data[/b]
Product Name - varchar
Height - varchar
Width - varchar
Small Image - varchar
Large Image - varchar
[b]Colour Options[/b]
White - boolean (yes/no option only)
Custom - boolean
Anodised - boolean
[b]Diffusers[/b]
Clear Reeded - boolean
Opal - boolean
Aluminium Louvre - boolean
Low Brightness Louvre - boolean
[b]Bends[/b]
90 degree - boolean
45 degree - boolean
X Bend - boolean
T Bend - boolean
Custom Angled Bend - boolean
My initial plan was to stick it all into a massive table and enter in every product feature and hard code it to the page but then if the customer comes up with a new feature for a product I have to go back and add another field to the table and edit the page and queries etc. There's got to be a better way.
My first thought was to have a product table with the basic info and then another table with the feature in it, then I could reference each item according to it's ID in a third table.
tblproduct
id
name
height
width
etc
tblfeature
id
cat_id
name
image
etc
tbldata
id
prod_id
feat_id
If anyone has any ideas that could prod me along in the right direction it would be most appreciated.
cheers. -
Hiya,
I have a strange problem. In my db table I have a field called "shipping". It obviously holds a dollar amount.
I am looping through my products and calculating the shipping charges. This is where it gets interesting.
In the db I have an amount like 1.30, when I loop through the query and calculate (shipping * quantity) it screws the amount up.
Shipping = 1.30
Quantity = 2
2 x 1.30 is giving me 2.59999990463
Whatever happened to 2.60?
Any ideas?
cheers. -
onemind,
I am trying to figure out the best way of putting my db onto the server. If I find out anythign I will let you know.
The best GUI tool I have come across so far is:
http://www.webyog.com/sqlyog/featurematrix.html
This makes using mySQL a breeze, there is a free version and an enterprise version.
Check it out.
Thoughts on setting this up?
in MySQL Help
Posted
You're already heading in the right direction. It can become as complex as you allow it to become. Just be sure to stop somewhere so your software doesn't become vaporware. :)
[/quote]
Yeah since my first post I have been playing with it a bit. Slowly sarting to get somewhere. Got a new requirement that is giving me a headache...time will tell! :)
Thanks for the reply.