[SOLVED] SQL and CB Keywords

13 years 8 months ago #138801 by ccoach
[SOLVED] SQL and CB Keywords was created by ccoach
Hi all,

I try to set the advanced filter (with sql statements) in a new CB list. It works fine for static statement, but I would like to use dynamical variables (like the userid) coming from the login context.

Example:
`cb_comccom` IN (SELECT cb_comccom FROM jos_comprofiler
WHERE user_id = $USER_ID)

Do you have some keywords which are automatically translated during the runtime, or do I have to do this in the php?

Thanks for your reply.

Post edited by: krileon, at: 2010/07/28 21:34

Please Log in to join the conversation.

13 years 8 months ago #138865 by ccoach
Replied by ccoach on topic Re:SQL and CB Keywords
I got the answer to my issue, I just had to read the documentation ;-)
§7.1 Dynamic User Lists

for example with the field cb_country, the syntax looks like this:
[code:1]'cb_country' LIKE '%[cb_country]%'[/code:1]

Post edited by: ccoach, at: 2010/07/28 21:05

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.144 seconds

Facebook Twitter LinkedIn