你好,我一個小問題,我的分頁程序,我想用一些自定義的SQL請求,但每次我點擊一個分頁程序鏈接,它加載我的模型,而無需自定義請求AgileToolkit - 自定義SQL請求+分頁程序
我輸入表單上的信息,我通過發送GET方法:
$view->grid->js()->reload(array("From" =>
$form->get("From"),"To" => $form->get("To"),"SSID" => $form->get("SSID")))
->execute();
在我的觀點,我有:
$this->request=$this->api->db->dsql();
$this->grid=$this->add('Grid');
$this->grid->setModel('Systemevents',array('ID','ReceivedAt','Message'));
$this->grid->addPaginator(10);
if (isset($_GET["SSID"])) {
$this->ssid = $_GET["SSID"];
}
if (isset($_GET["From"])) {
$this->from = $_GET["From"];
}
if (isset($_GET["To"])) {
$this->to = $_GET["To"];
}
$this->grid->dq->where($this->requette->expr('Message like "%.% '
. $this->ssid . ' % src=%"'))
->where($this->requette->expr("ReceivedAt >= '".$this->from. "'
AND ReceivedAt <= '".$this->to."'"));
的問題是,where條件disapear當我瓚用頁面標籤頁面。
最後的終極解決方案是要做到: – 2013-04-29 14:44:05