1
나는 다음과 같은 ZF2에서 쿼리가 : 난 단지 하나의 객체를 반환하고있어 이후 나는 배열 대신이 쿼리에서 개체를 반환 할 수젠드 프레임 워크이 반환 객체
public function BrandWallBrandsById($userId,$brandId,$startDate,$endDate)
{
$select = new Select();
$select->from(array('p' => $this->table), array('id'));
$select->join(array('b' => 'brands'), 'p.brandId = b.id', array('id','name', 'cover', 'slogan', 'startDate', 'homepage'));
$select->columns(array(new Expression('SUM(p.points) as points'), "userId", "brandId"));
$select->order("p.points desc");
$select->group("p.brandId");
$where = new Where();
$where->notEqualTo("p.points", 0);
$where->equalTo("p.userId", $userId);
$where->equalTo("p.brandId", $brandId);
$where->between("p.time", $startDate, $endDate);
$select->where($where);
return $this->historyTable->selectWith($select)->toArray();
}
을 [0] ?? 이 일을 할 수있는 방법이 있습니까?