diff --git a/application/default/controllers/ArchivesController.php b/application/default/controllers/ArchivesController.php index c1497aea..7bcdee52 100644 --- a/application/default/controllers/ArchivesController.php +++ b/application/default/controllers/ArchivesController.php @@ -131,7 +131,8 @@ class ArchivesController extends Zend_Controller_Action $sql = "SELECT n.*,c.id as typeid,c.code FROM ".$News->tbl_archives." n left join ".$News->tbl_catalog." ct on ct.aid=n.id left join ".$News->tbl_categorys." c ON ct.cid=c.id - WHERE c.id='{$row['id']}' AND n.ts_published<'".$time."' AND n.is_pub=true + WHERE c.id='{$row['id']}' AND n.ts_published<'".$time."' AND n.is_pub=true + and n.sub='$this->subnews' ORDER BY n.ts_published DESC"; $rs = $this->db->query($sql);