1
我在我的indexController中構建了一個Zend Paginator。前端列出了每頁20個類別,但我也有一個下拉列表,列出了所有主要類別。有沒有辦法使用相同的查詢?這是我到目前爲止已經試過:如何在Zend Paginator結束後獲取所有項目
$query = $categories->select()
->where($status)
->where($sq)
->order($this->view->sortoptions->by . ' ' . $this->view->sortoptions->order);
$this->view->categories = $categories->paginate($query->where($cat), $this->view->LayoutSettings->pagination->itemsperpage , $page);
$this->view->categoriesall = $categories->fetchAll($query->where("parent = 0")); // we get this for the categories listing in the dropdown
** $狀態和$平方米的過濾參數(如父母= 0)