设定首页新闻条数为5条
This commit is contained in:
parent
60688ab09b
commit
83c650c537
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue