I am trying to get my head around creating a matrix type table created dynamically using a formula and some predefined numbers, I know a little php but this is far beyond my scope.
Ok I have numerous static widths (mm) eg : 100 , 200, 300, 400, 500 .... up to say 1200. I also have numerous heights (mm )eg : 50, 60, 70, 80 ... up to say 1500
I have a price start point of £15, this would relate to the minimum width and height, 100 x 50
I then have a formula to multiply the preceding row cell by 1.6 to give a new price.
How would I be able to create a matrix table on the fly using this data? What I am trying to achieve as an example is as below.
width=> 100 200 300 400 500 600
Drop v
50 £15 £24 £38 £61 £98 £157
60 £24 £38 £61 £98 £157 £251
70 £38 £61 £98 £157 £251 £401
80 £61 £98 £157 £251 £401 £643
90 £98 £157 £251 £401 £643 £1028
100 £157 £251 £401 £643 £1028 £1646
I also need to assign all the values to a table in mysql defined as below for each permutation. The records already exist for each width and height permitation.
eg
width : 100
height : 50
price : 15
So I need to get all the prices in a workable array to do an insert into the relevant record in database.
I hope this makes sense and someone can point me in the right direction.
width
andheight
are related to the formula? – MeLight