Forums

DB Save doesn't work fine

mariacristinagallo 14 Feb, 2014
Hi,
I'm using Chronoforms V5 with joomla 2.5.18. I have a form that writes into database, but action "DB Save" works fine only during "Test Form" and not in site navigation.
Using this code:
<?php
pr(\GCore\Models\MODEL_NAME::getInstance()->dbo->log);
?>

I noticed that queries are not equal in two versions. In the first case there is an INSERT query, in the latter, it's UPDATE query...
Can you help me?
Max_admin 16 Feb, 2014
Answer
Hello,

Was the table created using Chronoforms or some way else ?

What's the table's primary key ?

Please add a "debugger" action before "db save", please post the debug info here.

And UPDATE will be used if there is a data param with the same name of the primary key.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mariacristinagallo 16 Feb, 2014
Hello Max,
thanks for your quick answer.

As you said, a data param had the same name of the primary key.
I have solved changing primary key name.

Thanks a lot!
This topic is locked and no more replies can be posted.