I need to extract a value from a table, at the time of capture, example:
Table1
idbuscar / TABULADOR / MENSUAL / DIARIO
1 / NORMAL / 2,400.00 / 80.00
1 / NORMAL / 4,500.00 / 100.00
2 / ESPECIAL / 2,400.00 / 120.00
2 / ESPECIAL / 4,500.00 / 200.00
I have 4 fields on my capture page: tabulador, mensual, diario.
In field "tabulador" i have a combobox selection ( NORMAL, ESPECIAL )
in field "mensual" when the salary is entered, I need to search the table1
In field "diario" is the result.
For Example: If I select "NORMAL" and i capture, "3,000.00" the result must appear in field "diario" with "80.00".
I do not know how to do it, but I think the code has to be in:
// Page Loading event
function Page_Loading() {
//echo "Page Loading";
}
// Get a field value
// NOTE: Modify your SQL here, replace the table name, field name and the condition
$MyField = ew_ExecuteScalar("SELECT MyField FROM MyTable WHERE XXX");
Thanks in advance.