Rows($sql); #-------------------------------------------------------------------------- #ORTHER NEWS $sql1 = " SELECT A1.*, A2.main_name FROM tbl_advnews as A1 left join tbl_company as A2 on A2.co_id = A1.co_id WHERE A1.adn_id < '$adn_id' ORDER BY A1.adn_id DESC LIMIT 0,10 "; $r1 = $db->Rows($sql1); #BANNER $sqlBanner = "SELECT * FROM tbl_banner WHERE ba_id = 1"; $rB = $db->Rows($sqlBanner); $smarty->assign('rB',$rB); #-------------------------------------------------------------------------- $smarty->assign('r',$r); $smarty->assign('r1',$r1); #-------------------------------------------------------------------------- $smarty->display($template_root.'advnews_detail.tpl'); ?>