I have a blank app that runs js.
Instead of calling another app to post the data to my table, how would I post directly to my table while in js?
Assuming my js has something like this:
var lat=“32.78912959”;
var lng="-96.8059256";
var deviceID=“abc123”;
Now I want to update to table with the above (in sc I would use the below):
$update_table = ‘IsawDevices’;
$update_where = “deviceID = ‘$deviceID’”;
$update_fields = array(
“lat = ‘$lat’”,
“lng = ‘$lng’”,
);
$update_sql = 'UPDATE ' . $update_table
. ' SET ' . implode(', ', $update_fields)
. ' WHERE ' . $update_where;
sc_exec_sql($update_sql);
sc_commit_trans();