Hi guys,
I'm having a bit of a strange issue with a database join element with a where clause.
I'll do my best to explain whats happening.
I have 2 tables;
table 'manual_transmission_jobs' where the database join element is being used
and
table 'dyno_setups' where the database join element looks up.
I want the database join element to return only one result based on a calc element 'setup' in the 'manual_transmission_jobs' table - the calc element returns the id of the desired row in 'dyno_setups' depending on the value of a dropdown element in the 'manual_transmission_jobs' table.
The issue I'm having is that when I try to add a new record I get a mysql syntax 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 'ORDER BY text ASC' at line 5
If access level on the database join element is set to anything other that 'public' you I get the same syntax error.
I think I'm getting the error on the add form because the calc element hasn't yet returned a row id.
I'm using this where clause to look up the record I want to link to:
WHERE {thistable}.id = {manual_transmission_jobs___setup_raw}
have also tried
WHERE {thistable}.id = {manual_transmission_jobs___setup}
Does anyone know why it's throwing the error?
I assumed that fabrik would have a build in way to deal with a no results scenario.
Any pointers would be much appreciated.
I'm having a bit of a strange issue with a database join element with a where clause.
I'll do my best to explain whats happening.
I have 2 tables;
table 'manual_transmission_jobs' where the database join element is being used
and
table 'dyno_setups' where the database join element looks up.
I want the database join element to return only one result based on a calc element 'setup' in the 'manual_transmission_jobs' table - the calc element returns the id of the desired row in 'dyno_setups' depending on the value of a dropdown element in the 'manual_transmission_jobs' table.
The issue I'm having is that when I try to add a new record I get a mysql syntax 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 'ORDER BY text ASC' at line 5
If access level on the database join element is set to anything other that 'public' you I get the same syntax error.
I think I'm getting the error on the add form because the calc element hasn't yet returned a row id.
I'm using this where clause to look up the record I want to link to:
WHERE {thistable}.id = {manual_transmission_jobs___setup_raw}
have also tried
WHERE {thistable}.id = {manual_transmission_jobs___setup}
Does anyone know why it's throwing the error?
I assumed that fabrik would have a build in way to deal with a no results scenario.
Any pointers would be much appreciated.