It has been sometime since I can no longer update my scriptCase, it says it is outdated but the updates don’t take for some reason: I now have a problem and I am not sure it is related.
This is my problem:
I had created a sub-form (Master/Detail) that had been working fine in the past until last night.
The subform has code to update another table and this just to work, today all I get is a “blank screen”, this is the reason I noted my other problem with updating scritpcase, has something changed ???
This is my code:
Subform is based on ‘orders’ table, I need to update another table called ‘clients’
Events -> onBeforeUpdate: In this even I have this code below.
Note that when I comment this block of code the form works but If I take the comments out I get a blank screen. ???
$update_table = ‘clients’; // Table name
$update_where = “cl_id = ‘{or_cl_id}’”; // Where clause
$update_fields = array( // Field list, add as many as needed
“cl_status = ‘{or_status}’”
);
$update_sql = ‘UPDATE ’ . $update_table
. ’ SET ’ . implode(’, ', $update_fields)
. ’ WHERE ’ . $update_where;
sc_exec_sql($update_sql);
Javascript message parameters
$javascript_title = ‘Updated’; // Javascript message title
$javascript_message = 'Update success!. '; // Javascript message contents
Display javascript message
sc_ajax_message($javascript_message, $javascript_title);