HI There,
I have the following code that updates multiple fields in a form. this works fine.
Now i don’t want to start a form but use a blank app to update the multiple fields from the table and save it in the table based on a where. but i can’t figure out how to do this for multiple fields at the same time.
this is the code:
// SQL statement parameters
$update_table = ‘ILP_rooster’; // Table name
$update_where = “wk_id = ‘{wk_id}’”; // Where clause
$update_fields = array( // Field list, add as many as needed
“wk_ex_opm = ‘CONCEPT #{wk_eduarte_lesnr} | {wk_eduarte_lesnaam}
LOC:$lokaal
D1:$doc1 | D2:$doc2’”,
);
// Update record
$update_sql = ‘UPDATE ’ . $update_table
. ’ SET ’ . implode(’, ', $update_fields)
. ’ WHERE ’ . $update_where;
sc_exec_sql($update_sql);<
the problem is that the field taht i wan’t to update is a merge field containing values from the same record. i could use something like…
sc_exec_sql("UPDATE products SET TotalValue = $vl_discount WHERE ProductID = {ProductID}");<
but how can i get the values form that same record before my update