调用数组上的成员函数func()

时间:2018-05-04 04:17:17

标签: cakephp-1.3

当我尝试在查询构建器中调用COALESCE函数时,它会显示致命错误

  

调用数组“。

上的成员函数func()

这是我的代码

$query = $this->Ticket->find();
$condition = array(
    'AND' => array(
        'Ticket.owner' => $query->func()->COALESCE($owner,'owner'),
        'Ticket.status' => $query->func()->COALESCE($status,'status'),
        'Ticket.updatedTime >=' => $query->func()->COALESCE($dateFrom,'updatedTime'),
        'Ticket.updatedTime <=' => $query->func()->COALESCE($dateTo,'updatedTime')
    )
);


$this->paginate = array(
    'limit' => 10,
    'order' =>'Ticket.updatedTime desc',
    'conditions' => $condition
);

0 个答案:

没有答案