Page 1 of 1

Subform not saving

Posted: Tue Jan 14, 2020 6:38 pm
by GlenMcCabe
I have 2 virtually identical subform structures.

Onward referrals and interventions

Each has a lookup field which selects the onward referral or intervention and in each case a date and notes are added. The onward referral subform works perfectly but the intervention subform creates a row which saves the notes and dates but not the id of the intervention.

I get the following error
[0] :
===USER==========

globeadmin

===PDO MESSAGE===

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE `id` = '1514'' at line 1

===SQL===========

UPDATE referral_interventions SET WHERE `id` = '1514';

===BACK TRACE====

C:\xampp\htdocs\nubuilder4\nudata.php - line 348 (nuRunQuery)

C:\xampp\htdocs\nubuilder4\nuapi.php - line 52 (nuUpdateDatabase)

ID is the row number which is tobe created or updated.

I have checked structures etc and cannot see differences between the subform structures. I have inserted values into the id field but these do not display in the subform even though they are in the table.

Thanks

Re: Subform not saving

Posted: Wed Jan 15, 2020 8:06 am
by kev1n
Hi,

Check the spelling of the fields, upper and lower case, additional spaces.

Re: Subform not saving

Posted: Wed Jan 15, 2020 3:56 pm
by GlenMcCabe
Thanks Kevin

Tried that but all field names have been chosen using the up and down arrows to toggle through field names.

I did try re selecting all but no difference.

Will try deleting the subform and try again.

Glen

Re: Subform not saving

Posted: Wed Jan 15, 2020 9:53 pm
by GlenMcCabe
Recreated form and subform. They look identical to originals but happy days it is now working.

Re: Subform not saving

Posted: Wed Jan 15, 2020 11:25 pm
by admin
.