修复SQL重复记录
This commit is contained in:
parent
817f305c43
commit
34ad3d40fc
|
@ -147,7 +147,6 @@ class Admin_DownController extends Zend_Controller_Action
|
|||
}
|
||||
else if($reset > 0)
|
||||
{
|
||||
$search="select * from offlineapp where";
|
||||
$sql="update dataorder set status='1' where status='3' and offlineappid='$reset'";
|
||||
if($this->db->exec($sql)>0)
|
||||
{
|
||||
|
@ -161,16 +160,8 @@ class Admin_DownController extends Zend_Controller_Action
|
|||
}//elseif
|
||||
//if
|
||||
}//reset
|
||||
/*$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')
|
||||
//->where('d.offlineappid>0')
|
||||
->order('o.ts_created desc');*/
|
||||
|
||||
$select="select o.*,d.status,d.offlineappid from offlineapp o
|
||||
$select="select distinct(o.*) from offlineapp o
|
||||
left join dataorder d on o.id=d.offlineappid
|
||||
where o.ts_approved is null
|
||||
and o.pdflink is not null
|
||||
|
|
Loading…
Reference in New Issue