I have a NewsModel which extends Zend_Db_Table_Abstract. the news-table consists of: newsid, title, text and creater. creater reffers to a userid of the user-table. User-table consists of userid and username.
Now i want to have the User in the NewsModel. At the moment
At the moment I do this in the model:
$select = $this->select(Zend_Db_Table::SELECT_WITH_FROM_PART)
->setIntegrityCheck(false);
$select->join('muskelpilot_users',
'muskelpilot_users.userid= muskelpilot_news.creater',
'username');
return $this->fetchAll($select);
Is there any other solution to solve this problem without a method?