CF8 - dbread join user id

Use a variable in a ChronoForms DB Read join condition.

Overview

Variables like {user:id} are not supported in the JOIN 'On' clause in the current version.
For now, place your condition in the WHERE statement instead. Full variable support in joins is planned for a future update.

Answered
ChronoForms v8
rb 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 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.
rb 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.

rb 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 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.
rb 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...

Post a Reply