我有这个查询,我试图将其移植到 Zend(甚至更远低于大声笑)。我收到此错误:
未捕获的异常 'Zend_Db_Table_Row_Exception' 带有消息'指定的列'admin_vfname'不在行中'
但是当我回显 $select 并将 sql 复制到 Navicat 时它运行正常吗?它有什么问题,因为我无法清楚地识别它?
SELECT `pay_administrator_actions`.*, `pay_administrator_actions`.*
FROM `pay_administrator_actions`
INNER JOIN `pay_administrator`
ON pay_administrator.admin_uid = pay_administrator_actions.admin_uid
WHERE (CONCAT(pay_administrator.admin_vfname, pay_administrator.admin_vlname) LIKE '%Daly%')
LIMIT 10
public function findActionsByName($name, $page, $rowCount)
{
$name = '%'.$name.'%';
$select = $this->select();
$select->setIntegrityCheck(false);
$select->from('pay_administrator_actions');
$select->join('pay_administrator', 'pay_administrator.admin_uid = pay_administrator_actions.admin_uid', 'pay_administrator_actions.*');
$select->where('CONCAT(pay_administrator.admin_vfname, pay_administrator.admin_vlname) LIKE ?', $name);
$select->limitPage($page, $rowCount);
return $this->fetchAll($select);
}