add order function

This commit is contained in:
wlx 2012-12-01 10:46:26 +00:00
parent 834e378db8
commit 47a173c904
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ class AboutController extends Zend_Controller_Action
$siteid="e31f5ea7-a4af-4ae3-9ac1-1a84132c4338";//site uuid from geonetowrk $siteid="e31f5ea7-a4af-4ae3-9ac1-1a84132c4338";//site uuid from geonetowrk
if(empty($ac)) if(empty($ac))
{ {
$sql="select * from mdref mr left join reference r on mr.refid=r.id where mr.uuid=?"; $sql="select * from mdref mr left join reference r on mr.refid=r.id where mr.uuid=? order by r.id desc";
$sth = $this->db->prepare($sql); $sth = $this->db->prepare($sql);
$sth->execute(array($siteid)); $sth->execute(array($siteid));
$rows = $sth->fetchAll(); $rows = $sth->fetchAll();