첫 번째와 두 번째 테이블에서 필드를 선택하는 zf2를 사용하여 간단한 조인을하고 싶지만 열의 필드 배열을 넣으려고하면 'Statement could not be executed'라는 오류가 발생합니다.zf2 - Zend Db TableGateway TableGateway를 사용하여 가입하십시오.
public function fetchAll()
{
$resultSet = $this->tableGateway->select(function (Select $select) {
$select->columns();// ->with params gives an 'Statement could not be executed'
$select->join(array('t2' => 'categories'), 'table1.idCategory = t2.id');
$select->order('dateTime DESC')->limit(100);
});
...
}
여기에서 답을 찾을 수 있습니다. -> http://stackoverflow.com/questions/14354802/tablegateway-with-multiple-from-tables/14371056#14371056 – Diemuzi
예외를 반환 할 때 사용하고있는 예를 보여줄 수 있습니까? ? – Andrew