jfquestiaux
Well-Known Member
I have a complex (for me) form with 3 CDD's that I finally got working, at least partially:
If I edit an existing record, the form works as expected: each CDD is triggered the way it should and the correct values are displayed in the dropdowns.
But if I want to add a new record, I get this error:
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 '}) ORDER BY text ASC' at line 3 SQL=SELECT DISTINCT(`manufacturers`.`id`) AS value, `manufacturers`.`name`AS text FROM `manufacturers` AS `manufacturers` WHERE manufacturers.id IN (select manufacturer_id from equipment_manufacturer where type_id = {equipment___type_id_raw}) ORDER BY text ASC
The problem seems to be that, in an empty form, '{equipment___type_id_raw}' is empty, thus causing an error.
This form is essential in this application. Any idea how to fix this? I am stuck here now.
If I edit an existing record, the form works as expected: each CDD is triggered the way it should and the correct values are displayed in the dropdowns.
But if I want to add a new record, I get this error:
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 '}) ORDER BY text ASC' at line 3 SQL=SELECT DISTINCT(`manufacturers`.`id`) AS value, `manufacturers`.`name`AS text FROM `manufacturers` AS `manufacturers` WHERE manufacturers.id IN (select manufacturer_id from equipment_manufacturer where type_id = {equipment___type_id_raw}) ORDER BY text ASC
The problem seems to be that, in an empty form, '{equipment___type_id_raw}' is empty, thus causing an error.
This form is essential in this application. Any idea how to fix this? I am stuck here now.