Q:

Matrix Manipulation for MySQL

I'm currently working on a quote retrieval system for my employer's website using mysql/php/html. They currently use a pricing matrix in the form of a two way table with height and width along each axis in a spreadsheet that lets you look up price. 
My question is what's the best way of manipulating this matrix into a database table usable by mysql? Since the pricing grids they use are up to 19x17 I realise that I would need a 3 column table (width, height, price) with 323 (19x17) rows for every permutation of the available heights and widths and it's corresponding price, but is there a less longwinded way to achieve this without manually entering each possible width and height combination?
Thanks
EDIT: an example of the grid is on the left and the format I need it in is on the right
http://img163.imageshack.us/img163/406/82853790.jpg

A:

First you need the data from the old matrix, by SELECT column[0], column[1] from oldMatrix and copy the result to a spreadsheet..
I think you have a mess on the first table, the second table ok [based on the image you posted]
Try SELECT column[0] where column[0]=500 AND column[1]=700 after that copy the result to a spreadsheet and create the newmatrix (table).
Good Luck.

