【发布时间】:2017-02-05 01:36:07
【问题描述】:
我正在尝试对两个连接列 fname 和 lname 执行搜索。
这似乎不起作用:
Object of class Cake\Database\Expression\FunctionExpression could not be converted to string
$users = $this->Users->find();
$users->select(['id', 'fname', 'lname'])
->where([$users->func()->concat(['fname', 'lname']).' LIKE' => $terms]);
有什么想法吗?
谢谢。
【问题讨论】:
标签: cakephp cakephp-3.0 query-builder cakephp-3.x