Forums

database save error

glarkin 24 Aug, 2011
Hi Bob Trouble saving form results on submit to the database, get following message:

Parse error: syntax error, unexpected '-', expecting '{' in C:\xampp\htdocs\Joomla\administrator\components\com_chronoforms\form_actions\db_save\db_save.php(63) : eval()'d code on line 3

Fatal error: Call to a member function bind() on a non-object in C:\xampp\htdocs\Joomla\administrator\components\com_chronoforms\form_actions\db_save\db_save.php on line 86

Any ideas? V4 Joomla 1.7 Thanks G
GreyHead 24 Aug, 2011
1 Likes
Hi glarkin,

You probably have a dash '-' in one of your input names. Dashes give ChronoForms and MySQL problems. Please rename the input using only [a-z], [A-Z], [0-9] or underscore '_'. No dashes, spaces or other special characters. You will need to rename any matching database column too.

Bob
glarkin 24 Aug, 2011
Hi Bob Many thanks. Input names = field name? if so all ok. Presumably doesnt effect selections in a drop down list? Thanks G
glarkin 24 Aug, 2011
Hi Bob sorted, incorrect table name!! when i saved the table i gave it a name with a "-" in it, changed to "_" and all works fine. Great job!!! thanks mate. Cheers G
GreyHead 25 Aug, 2011
Hi glarkin,

Well found!

Just for the record it doesn't affect option values in a drop-down list just name attributes and table names.

Strictly you can use dashes in MySQL table names but they have to be quoted in queries as `table-name` or `column-name` but somewhere deep in Joomla! or ChronoForms the quoting is missing and the errors are the result.

Bob
Max_admin 25 Aug, 2011
Hi,

The quotes are already there, in the new version I have added a - to _ replacer in the generated table name, hopefully this will make this issue less frequent.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.