Where on Read_data don't work

How to fix Read_data where statement not working with variable quotes in ChronoForms.

Overview

The problem is that using {var:action_name} in a Read_data where clause generates a SQL statement without quotes, causing a database error, while {var.quote:action_name} creates a correct SQL but still throws a syntax error, likely due to a corrupted form imported from ChronoForms v7.
Rebuild the form from scratch in ChronoForms v8 instead of importing it from v7, as the import process can cause issues with variable handling in SQL statements.

Answered
ChronoForms v8
na nat22 15 Jun, 2026

I have a problem with the where statement in read_data.

If I use filed_name={var:action_name}, CV8 creates a SQL statement without quotes, and the database throws an error because it interprets it as a field. 

If I use filed_name={var.quote:action_name}, the SQL statement seems correct in Joomla 

SELECT * FROM `wodn_erp_itemcolor` WHERE item = 'ZZZ001' 145μs1.3KB/libraries/chrono_lib/chrono.php: 1566 Copy

but then it gives me the error Joomla 

 "1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '13' at line 1."The problem doesn't seem to occur with {data:}.

Can you help me?

Thank you

Nathan

Joomla 6.1

CF 8.0.52

MariaDB database

Max_admin Max_admin 15 Jun, 2026

Hi Nathan

What is the full SQL giving the error:

1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '13' at line 1.

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
na nat22 16 Jun, 2026
Answer
1 Likes

Hi Max,

I imported this form from CV7.

Before reading your reply, I rebuilt it from scratch in CV8.

In the new form, the problem was solved and everything works properly.

Thanks for your help.

Nathan

Max_admin Max_admin 29d ago

Hi Nathan

Great, maybe some imported Read Data configuration caused the conflict, glad it works well now.

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Post a Reply