Placeholder no longer working in databasejoin element

Bauer

Well-Known Member
I have a few databasejoin elements that use the {tablename___elementname} placeholder in the WHERE condition.

For example this is the WHERE/ORDER clause I am using...
WHERE {thistable}.id IN ({fb_reports___valid_facility_types}) ORDER BY listorder

The {tablename___elementname} is an element in the same table/list/form containing the databasejoin element (fb_reports). This is not a joined table with any repeat groups either.

Since I updated from Github this morning these elements produce errors - and {tablename___elementname} is now always empty. For example, now I am getting this error (when using the example above)...

If difficulties persist, please contact the System Administrator of this site and report the error below.
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 ')' at line 4 SQL=SELECT `fb_reports_repeat_included_reports`.id AS id,`fb_reports_repeat_included_reports`.parent_id, `fb_reports_repeat_included_reports`.`included_reports` AS value, `fb_facility_types`.`facility_type` AS text FROM `fb_reports_repeat_included_reports` LEFT JOIN fb_facility_types ON `fb_facility_types`.`id` = `fb_reports_repeat_included_reports`.`included_reports` WHERE fb_reports_repeat_included_reports.id IN ()​
 
The element fb_reports___valid_facility_types does contain anything?
Yes, I suppose I should have mentioned - it is a string of numbers. e.g. "5,2,1" - which are the valid ids for filtering the dbjoin element. I intentionally stored those like that so I could use the mysql IN() function. And it has always worked until now.
 
Is this in form view?
Such a placeholder in data-where is working on my site.
What was the "running" version?
 
Is this in form view?
Such a placeholder in data-where is working on my site.
What was the "running" version?
Yes its a form view. Like I said, I updated from Github yesterday morning. I assumed it had something to do with that and just wanted to alert you guys. Just a while ago I came across another instance -in another databasejoin element in that same form - same problem. But if you have no problems it's probably something I'm doing in that form. I never really tested it on my simple 'test' table yet. I'll post if/when I solve the issue.
 
I tested as well, works OK here.

There was a few hours on Fri when calc's in general were borked in github, but that was fixed earlier today. So you might try updating again.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top