1、news category.id in(1)
This commit is contained in:
parent
7447ba6b71
commit
7f1b0306e5
|
@ -64,7 +64,7 @@ class IndexController extends Zend_Controller_Action
|
||||||
$this->view->news = $rows;
|
$this->view->news = $rows;
|
||||||
|
|
||||||
//$time = date("Y-m-d H:i:s",time());
|
//$time = date("Y-m-d H:i:s",time());
|
||||||
$sql = "SELECT * FROM archive WHERE is_pub=true AND ts_published<now() AND image IS NOT NULL AND image != '' 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 in(1,17)) order by ts_published desc LIMIT 12 ";
|
$sql = "SELECT * FROM archive WHERE is_pub=true AND ts_published<now() AND image IS NOT NULL AND image != '' 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 in(1)) order by ts_published desc LIMIT 12 ";
|
||||||
$sth = $this->db->query($sql);
|
$sth = $this->db->query($sql);
|
||||||
$rows = $sth->fetchAll(PDO::FETCH_BOTH);
|
$rows = $sth->fetchAll(PDO::FETCH_BOTH);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue