I have a Query Drop Down (Multi-select) field with the following query:
Code:
SELECT id, DATE_FORMAT(date, '%M %e') as formatted_date
FROM oq7ve_sportscoop_sport_date
WHERE sport = 1 AND year = 2019
It is working fine; however, I need to change it so that it gets the year value in the WHERE clause (i.e. 2019) from the component parameters of a custom component.
If I could run PHP here I would use something like this:
Code:
$programYear = JComponentHelper::getParams('com_sportscoop')->get('sys_program_year');
And then just change the where clause to:
Code:
WHERE sport = 1 AND year = $programYear
Is there any way to do this within CB - to pull that component param in to use it as part of the WHERE clause in this query?