I need to update the Remark field in my table ‘student’ by concatenating the text data with the Remark field in my secondary table Problem_Student by matching the Student_reg in both tables.
so i add a event onValidateSuccess
// SQL statement parameters
$update_table = ‘student’; // Table name
$update_where = “student_reg = ‘student_reg’”; // Where clause
$update_fields = array( Remark );
// Update record
$update_sql = ‘UPDATE ’ . $update_table
. ’ SET ’ . implode(’, ', $update_fields)
. ’ WHERE ’ . $update_where;
sc_exec_sql($update_sql);
but got error
Error
Use of undefined constant Remark - assumed ‘Remark’
Error while accessing the database:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘WHERE student_reg = ‘student_reg’’ at line 1
please i’m new to this