I am trying to migrate an Excel table to MySQl using PHP to transfer/access the data on a daily basis.
The Current Excel table takes an input of Max temperature and computes and stores accumulated growing degree-days. A cell formula does the computation.
Although I know there are 'calculated' columns in MySQL, I see no place for formulas, and don't understand how that could be applied in this case.
The current Excel cell formula is simple; looks something like this:
Todays AccumDD = Yestdays AccumDD + (MaxTemp-43 [if >0])
I only need to store each day's Accum. DD.
I suppose an alternative might be to do the computation on the PHP page when the max temp in input, thereby keeping the math out of MYSQL. However, the PHP page would have to extract Yestday's Accu.DD from MySQL first. Haven't given much thought to this option yet.
THe question is --How do I embed, or otherwise handle the clculation in a MySQL table. Or do I seek another option?
The Current Excel table takes an input of Max temperature and computes and stores accumulated growing degree-days. A cell formula does the computation.
Although I know there are 'calculated' columns in MySQL, I see no place for formulas, and don't understand how that could be applied in this case.
The current Excel cell formula is simple; looks something like this:
Todays AccumDD = Yestdays AccumDD + (MaxTemp-43 [if >0])
I only need to store each day's Accum. DD.
I suppose an alternative might be to do the computation on the PHP page when the max temp in input, thereby keeping the math out of MYSQL. However, the PHP page would have to extract Yestday's Accu.DD from MySQL first. Haven't given much thought to this option yet.
THe question is --How do I embed, or otherwise handle the clculation in a MySQL table. Or do I seek another option?