Forums

Updating Records - SQL Array Error

ctrlmedia 26 Apr, 2017
Hi,

I have successfully managed display records in a table. The values are displayed within text inputs. I have also managed to save any changes to the inputs using a toolbar button as per the article example in CCv6.

As well as the text inputs I also want to update the records if a "completed" checkbox has been checked.
I have used the loop and save as per the inputs I previously did but I now get the following sql error:

1054 - Unknown column 'Array' in 'field list' SQL=UPDATE `TABLE_NAME` AS `Issues` SET `completed` = Array WHERE `cckey` = '3';

When I don't have the "SAVE" the debug shows that the "completed" array is the same layout as the "notes" array (which is the text inputs that do work) so I am not sure why there would be an issue with the array? (if that is the problem)

I'm not sure this is all of the information required but if anyone has any ideas It would be much appreciated.
Kind Regards
Max_admin 26 Apr, 2017
Hi ctrlmedia,

What is the data provider of the save function ?

You have the latest update, correct ?

Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
ctrlmedia 26 Apr, 2017
Hi Max,

There is no data provider in the Save function. There is a loop which uses the save function. The loop data provider is {data:completed}.
The text fields that are saved/updated work fine this way as per the article example.

I have updated to the latest version and the SQL error has changed to just:
1054 - Unknown column 'Array' in 'field list'

Kind Regards
Max_admin 27 Apr, 2017
Answer
Hi ctrlmedia,

Then do you have anything in the "Data override" section of the save function ? since its inside a loop you can use this:
completed:{var:loop_fn_name.row}

Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
ctrlmedia 27 Apr, 2017
Hi Max,
I had the following:
completed:{var:save_completed_loop}

I forgot to add ".row" to the end!
Thanks for helping me spot the error!

Now that is working I have a couple of other questions which I will create new topics for!


Kind Regards
This topic is locked and no more replies can be posted.