com_chronoforms [chronoform] => dodatkowe [event] => submit [Itemid] => [pokaz_name] => Operator Drugi [pokaz_email] => dummy@wp.pl [komorkowy] => 1234 [szkola_id] => 90004 [cf_uid] => 44 [input_submit_3] => Zapisz [fdf8cd5da72ba16aa34061d321392341] => 1)The lines [komorkowy] => 1234 [szkola_id] => 90004 [cf_uid] => 44are fields to be stored in:CREATE TABLE IF NOT EXISTS `addnl_users` ( `cf_uid` int(11) NOT NULL, `komorkowy` varchar(9) NOT NULL, `szkola_id` int(11) NOT NULL, PRIMARY KEY (`cf_uid`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;What could be reason that despite matching names update works and insert does not?I could send the form and the table if someone could take a look...Henryk"> CF V4 does not create record - Forums

Forums

CF V4 does not create record

bighen 06 Apr, 2012
Hi,
I have a problem quite odd.
My form does not create a new record, while updates existing one.
I have additional info about users stored in additional table "addnl_users".
When user has the record in it the form saves changes correctly.
If the user does not have the record nothing happens...

Here is debugger output:
Data Array:

Array
(
    [option] => com_chronoforms
    [chronoform] => dodatkowe
    [event] => submit
    [Itemid] => 
    [pokaz_name] => Operator Drugi
    [pokaz_email] => dummy@wp.pl
    [komorkowy] => 1234
    [szkola_id] => 90004
    [cf_uid] => 44
    [input_submit_3] => Zapisz
    [fdf8cd5da72ba16aa34061d321392341] => 1
)


The lines
[komorkowy] => 1234
[szkola_id] => 90004
[cf_uid] => 44
are fields to be stored in:
CREATE TABLE IF NOT EXISTS `addnl_users` (
  `cf_uid` int(11) NOT NULL,
  `komorkowy` varchar(9) NOT NULL,
  `szkola_id` int(11) NOT NULL,
  PRIMARY KEY  (`cf_uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


What could be reason that despite matching names update works and insert does not?

I could send the form and the table if someone could take a look...

Henryk
GreyHead 06 Apr, 2012
Hi Henryk,

There's no sign of a DB Save action in the Debug output?

If you turn on Site Debug temporarily you should see all of the MySQL queries being run when you submit the form. Take a look and see what the save query looks like - if necessary you can test it with PHPMyAdmin.

Bob
bighen 06 Apr, 2012
Dear Bob,
Thanks for a good tip about Debug Console.
Silly thing I never used it before,
though managed to set whole Eclipse PDT enviroment to chase some bugs...

The problem was related somehow to the table structure (maybe field name conflict ???)
I recreated the form as simple one without creating select from database etc
and created the table with the wizard.
So I've got working set of form-table inserting records properly.
Then used my original form with "insert" problem binding it to the fresh made table.
Now I've got form inserting records like ... every time I submit it...
So now I'm gonna read all posts about "records not updated" and hopefully get it working

Thanks for your help.
Henryk
This topic is locked and no more replies can be posted.