change order

This commit is contained in:
wlx 2013-04-22 17:24:30 +00:00
parent 6e539bff3d
commit 34026ae2f7
1 changed files with 3 additions and 3 deletions

View File

@ -20,9 +20,9 @@ class Fund extends Zend_Controller_Plugin_Abstract
{ {
if(empty($uid)) if(empty($uid))
{ {
$sql = "SELECT * FROM ".$this->tbl_fund." ORDER BY id"; $sql = "SELECT * FROM ".$this->tbl_fund." ORDER BY id desc";
}else{ }else{
$sql = "SELECT * FROM ".$this->tbl_fund." WHERE userid=$uid ORDER BY id"; $sql = "SELECT * FROM ".$this->tbl_fund." WHERE userid=$uid ORDER BY id desc";
} }
$rs = $this->db->query($sql); $rs = $this->db->query($sql);
$rows = $rs->fetchAll(); $rows = $rs->fetchAll();
@ -57,7 +57,7 @@ class Fund extends Zend_Controller_Plugin_Abstract
$sql = "SELECT f.*,mf.place,mf.id as mfid FROM ".$this->tbl_fund." f $sql = "SELECT f.*,mf.place,mf.id as mfid FROM ".$this->tbl_fund." f
LEFT JOIN ".$this->tbl_mdfund." mf ON mf.fid=f.id LEFT JOIN ".$this->tbl_mdfund." mf ON mf.fid=f.id
$wheresql $wheresql
ORDER BY mf.place DESC"; ORDER BY mf.place";
}else{ }else{
$sql = "SELECT f.* FROM ".$this->tbl_fund." f $wheresql ORDER BY f.id DESC"; $sql = "SELECT f.* FROM ".$this->tbl_fund." f $wheresql ORDER BY f.id DESC";
} }