update index news list
This commit is contained in:
parent
1d066254b5
commit
d5328efa93
|
@ -64,7 +64,7 @@ class IndexController extends Zend_Controller_Action
|
|||
$this->view->news = $rows;
|
||||
|
||||
//$time = date("Y-m-d H:i:s",time());
|
||||
$sql = "SELECT * FROM archive WHERE is_pub=true 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 ";
|
||||
$sql = "SELECT * FROM archive WHERE is_pub=true 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.id=4) order by ts_published desc LIMIT 12 ";
|
||||
$sth = $this->db->query($sql);
|
||||
$rows = $sth->fetchAll(PDO::FETCH_BOTH);
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<li id="main-nav-index"><a href="/"><span>首页</span></a></li>
|
||||
<li id="main-nav-data"><a href="/data"><span>数据产品</span></a></li>
|
||||
<li id="main-nav-author"><a href="/author"><span>数据作者</span></a></li>
|
||||
<li><a href="/archives/news/featured"><span>新闻动态</span></a></li>
|
||||
<li><a href="/archives/news/localnews"><span>新闻动态</span></a></li>
|
||||
<li><a href="/about"><span>关于本站</span></a></li>
|
||||
</ul>
|
||||
|
||||
|
|
Loading…
Reference in New Issue