I have a form that uses data connector and mysql
Inserting a record is fine, but when I update a record, the sql Where clause (from log) ends with “WHERE id
=‘3’ AND (( id = ‘-1’) AND id
= ‘-1’)” hence nothing is saved but no error is reported.
(3 is correct id)
Controller:
$form1 = new FormConnector($conn,“MySQL”);
$form1->enable_log(“xformsave.txt”);
$sql = “SELECT id,identifier,q1,q2,q3,q4,q5,q6a,q6b,q6c,q6d FROM Questionnaire WHERE id = '”.$id.“'”;
$form1->render_sql($sql,“id”,“identifier,q1,q2,q3,q4,q5,q6a,q6b,q6c,q6d”);