修复了一处逻辑错误,修改了分页源数据输入,zf_db不支持高级联合查询
This commit is contained in:
parent
6e5ea71f28
commit
817f305c43
|
@ -133,7 +133,7 @@ class Admin_DownController extends Zend_Controller_Action
|
|||
$this->_redirect('/admin/down/offlineapp/'.$page);
|
||||
} else if($reset){
|
||||
|
||||
if($reset < 1)
|
||||
if($reset < 0)
|
||||
{
|
||||
|
||||
$fortime = date('Y-m-d',(time()-24*3600*365));
|
||||
|
@ -147,8 +147,9 @@ class Admin_DownController extends Zend_Controller_Action
|
|||
}
|
||||
else if($reset > 0)
|
||||
{
|
||||
$sql="update dataorder set status='1' where offlineappid='$reset'";
|
||||
if($this->db->exec($sql)<1)
|
||||
$search="select * from offlineapp where";
|
||||
$sql="update dataorder set status='1' where status='3' and offlineappid='$reset'";
|
||||
if($this->db->exec($sql)>0)
|
||||
{
|
||||
$this->messenger->addMessage('已经成功对该申请重置');
|
||||
$this->_redirect('/admin/down/offlineapp/');
|
||||
|
@ -160,14 +161,24 @@ class Admin_DownController extends Zend_Controller_Action
|
|||
}//elseif
|
||||
//if
|
||||
}//reset
|
||||
$select=$this->db->select();
|
||||
/*$select=$this->db->select();
|
||||
$select ->from('offlineapp as o')
|
||||
->join('dataorder as d','o.id = d.offlineappid')
|
||||
->where('o.ts_approved is null')
|
||||
->where('o.pdflink is not null')
|
||||
->where('d.status=3')
|
||||
->order('o.ts_created desc');
|
||||
$paginator = Zend_Paginator::factory($select);
|
||||
//->where('d.offlineappid>0')
|
||||
->order('o.ts_created desc');*/
|
||||
|
||||
$select="select o.*,d.status,d.offlineappid from offlineapp o
|
||||
left join dataorder d on o.id=d.offlineappid
|
||||
where o.ts_approved is null
|
||||
and o.pdflink is not null
|
||||
and d.status=3
|
||||
order by o.ts_created desc";
|
||||
$rs=$this->db->query($select);
|
||||
$rows=$rs->fetchAll();
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($page);
|
||||
$paginator->setItemCountPerPage($this->view->config->page->max);
|
||||
$paginator->setView($this->view);
|
||||
|
|
Loading…
Reference in New Issue