add the first author information

This commit is contained in:
wlx 2011-10-29 08:27:22 +00:00
parent 387f457031
commit 7229d9381d
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ class KnowledgeController extends Zend_Controller_Action
function indexAction() function indexAction()
{ {
//$this->_redirect('/metadata'); //$this->_redirect('/metadata');
$sql="select * from knl_article where url <>'' order by item_id desc limit 10"; $sql="select a.author,c.* from knl_article c left join knl_author a on c.item_id=a.item_id where c.url <>'' and a.place=1 order by ts_created desc limit 10";
$this->view->articles=$this->db->fetchAll($sql); $this->view->articles=$this->db->fetchAll($sql);
} }
function preDispatch() function preDispatch()