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 a 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 every time user key in something into text field then the other part of HTML would reflect changes based on formula that I fetched from database.
This is simple function that I have right now:
inputListened: function (e) {
var equation = $('input[data-equation]').data('equation');
if (!_(equation).isBlank())
console.log(equation);
}
the console would simply output the formula from database but I don't know how to represent number with other variable