1064 You have an error in your SQL syntax;

Resolve a SQL syntax error in a ChronoForms database search.

Overview

The error occurs because the SQL query generated by the CF "Read Data" action contains an incorrect table name format, specifically due to a hyphen.
Ensure the table name in the CF action settings does not contain hyphens or other special characters. Rename the database table to use underscores instead.

Answered
ChronoForms v6
mh mholinka 14 Apr, 2021
Answer
I want to make a database search form where i can choose from predefined values (radio/dropdown).
in the submit actions i have the read data:

1064 You have an error in your SQL syntax; image 1

bit everytime i get on submit the error:

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM `chronoforms_data_dbmm-input` AS `dbmmdata`' at line 1


i turned on debugging wherever it was possible, but i cannot find any SQL statement or where the error might be.
any ideas? im lost...

Joomla 3.9.26
Chronoforms 6.1.4
MySQL 5.7.28
PHP 7.4.14

Cheers,
Marcus
Gr GreyHead 15 Apr, 2021
Hi Marcus,

If you turn the ChronoForms Debugger on then you should be able to see the query that is being created.

Bob
mh mholinka 15 Apr, 2021
Thanks Bob,
i turned it on on every switch i found, but there is NO querey, thats why you see me helpless....

in the very moment i press the submit button, the mentioned error message appears without showing debug info :-(

Cheers,
Marcus
Gr GreyHead 15 Apr, 2021
Hi Marcus,

please check the table name is correct - usually there is a prefix before chronoforms

Bob
mh mholinka 15 Apr, 2021
The Table name is "chronoforms_data_dbmm-input" - it was selected from the dropdown "Database table" - no prefix. :-/
Marcus
Gr GreyHead 15 Apr, 2021
Hi Marcus,

And does that table exist in the database?

Bob
mh mholinka 15 Apr, 2021
Yes, it was created by chronoforms, I can connect and write to it (with another form)
Cheers,
Marcus
This topic is locked and no more replies can be posted.