我需要用一个左连接$var
!没有变量,代码可以工作:
$query->select('d.value AS department');
$query->join('LEFT', '#__jea_departments AS d ON d.id = p.department_id');
我尝试了输入变量的所有语法,但它不起作用!
$var="d.test";
$query->select('**$test** AS department');
$query->join('LEFT', '#__jea_departments AS d ON d.id = p.department_id');
我试过"$test" {$test}
了,但它不起作用。