• Fabrik4.5.3 for J!5.3.0 and J!4.2+is out

    You must update from Fabrik4.5.1 if you are running Joomla!5.3.0

    See Announcements

Am I using this placeholder wrong? {shortlang}

mirceat

Member
Hello,

Because i tried this code and i can't make it work to concat a label in a dbjoin element:

Code:
(select case when '{shortlang}' == 'ro' then {thistable}.nume_camp_ro else {thistable}.nume_camp_en end)

"500 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 '= 'ro' then nume_camp_ro else nume_camp_en end)) AS text
FROM..

Tried with and without quotes around '{shortlang}'

Thank you
 
nope..same error..the problem seems to be that {shortlang} doesn't get any value so there is nothing to compare?
 
But it should not throw a SQL error even if not replaced (would become ''= 'ro' or '{shortlang}'='ro')

I just tested, {shortlang} is replaced as expected.
So there seems to be a systax error elsewhere in your query.
 

Members online

No members online now.
Back
Top