设定首页新闻条数为5条

This commit is contained in:
wlx 2014-06-16 02:15:32 +00:00
parent 60688ab09b
commit 83c650c537
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ class IndexController extends Zend_Controller_Action
//$time = date("Y-m-d H:i:s",time());
$sql = "SELECT * FROM archive WHERE is_pub=true and sub='$this->subnews' AND ts_published<now()
and id in (select ar_catalog.aid from ar_catalog left join ar_category on ar_catalog.cid=ar_category.id where ar_category.ptype='news')
order by ts_published desc LIMIT 12 ";
order by ts_published desc LIMIT 5 ";
$sth = $this->db->query($sql);
$rows = $sth->fetchAll(PDO::FETCH_BOTH);