Store a formula in a table and use the formula in a javascript/PHP function
Posted
by
Muhaimin Abdul
on Pro Webmasters
See other posts from Pro Webmasters
or by Muhaimin Abdul
Published on 2014-06-11T06:50:16Z
Indexed on
2014/06/11
9:42 UTC
Read the original article
Hit count: 427
I have a MySql database where part of it handles instrument's depth of water. Each instrument has its own formula of calculation how depth the water when the operator collect the reading I stored the formula for each instrument in database/MySql.
Example formula: [55-57]
this is the simple minus operation, where the number is actually represent the id of a row. How do I represent those number with id of a row and later convert it to javascript readable code. I simply want to do keyup event where everytime user key in something into text field then the other part of HTML would reflect changes based on formula that I fetched from database
FYI, I'm using BackboneJS together with RequireJS
© Pro Webmasters or respective owner