【发布时间】:2012-11-14 16:38:34
【问题描述】:
我正在尝试对数据网格进行远程过滤。
网格有一个文本字段,用户可以在其中输入发送到服务器以刷新网格的字符。
我的问题是我使用 Propel 来处理数据库,我需要连接两个 MySQL 字段来进行比较。我不知道如何在 Propel 中做一个简单的where concat(firstname, ',', lastname) like '%aText%'。
我试过了:
$usuarios = UsuariosQuery::create()
->where("(concat(usuarios.apellido,' , ',usuarios.nombre)) LIKE '%?%'",$filter)
->orderByApellido('ASC')
->find();
这不起作用。我怎样才能让它工作?
【问题讨论】:
标签: mysql orm where propel concat