I want to write out multiple records into a table using a DBSave.
So I created the data in a Model which contains data (in part) as follows:
[C] => Array
 => Array
[attributes] => Array
[type] => Contact
[url] => /services/data/v40.0/sobjects/Contact/0039000001o080bAAA
[LastName] => Name
[Website__c] => www.mysite.com
[Nearest_Town_to_Site__c] => Someplace
[MobilePhone] => xxx
[Mbr_Region__c] => MyState
[Member_Nbr__c] => M-17021
[DB Save] => Array
[Queries] => Array
 => INSERT INTO `2bi_chronoengine_chronoforms_clublist` (`Website__c`, `Facebook_Page__c`, `Nearest_Town_to_Site__c`, `MobilePhone`, `Mbr_Region__c`, `Member_Nbr__c`, `uniq_id`, `created`) values ('www.mysite.com', '', '', 'xxx', 'MyState', 'M-17021', '17e4f0a13e1f08e7d44ffc10861b13dc31b0c6ea', '2017-08-14 08:52:02');
Have you tried clicking the Delete Cache icon in the Forms Manager toolbar?
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
Yes, and it made no difference. I got around it in the end by using a JFactory query inside a foreach looking through the array, instead of the DBSave. This worked fine, except for one error as noted below. It's a bit more code but at least it is pretty much guaranteed.
I did discover that one record in the data for the field that wasn't saved contained an embedded quote ( "O'Connor"). I wonder if it is this which threw the DBSave off track?
That could be the problem though the data should be MySQL quoted to prevent that. What I noticed was that the INSERT statement doesn't LastName as a Column so it seems it isn't being found in the table info,
2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com