CF8 - dbread join user id

How to build SQL query JOIN using the Read Data action in ChronoForms8 and how to use variables in the JOIN condition.

rbock 01 May, 2025

Is it true that in the DB Read action you cannot use a variable, e.g. {user:id}, in the join?

LEFT JOIN -> X1.BID = X2.BID AND X2.USER = {user:id}

Max_admin 01 May, 2025
Answer

You mean using a variable in the "On" condition ? yes, variables are not supported there but I have added this to the next update

But you can use your condition in the WHERE statement for now, it should work

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
rbock 02 May, 2025

How can I implement this?

In the join, when I manually enter the user ID, I get 41 results.

In the where, I only get 6.

Presumably the entries that exist in both tables.

rbock 02 May, 2025

I think it doesn't work that way, using the Where query. I also wanted to solve this with SQL code, but count and pagination don't work properly. Numerous filters are also in use.

When will the current version be released?

Max_admin 05 May, 2025

Hi rbock

When do you need this feature ? this week ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
rbock 05 May, 2025

Actually, it's May 1st. ;-)But for now, I've deactivated various filters related to "join fields." So, no time pressure...

You need to login to be able to post a reply.