class RelationModel extends Zend_Db_Table_Abstract {
protected $_name = 'relations';
protected $_primary = array('id');
public function fetchAll($select=null) {
if(is_null($select))
$select = parent::select();
$select->setIntegrityCheck(false); => this is the problem
$select->from($this->_name)
->joinLeft('common_countries',
'common_countries.id=relations.country_id',
array('country)
)
$results = parent::fetchAll($select);
return $results;
}
My Controller:
$model = new RelationModel();
$results = $model->find(1);
it's returning : "Fatal error: Call to a member function setIntegrityCheck()
on a non-object in ..."
Why is it going in my 'RelationModel' and calls the function fetchAll?
Anyone had the same problem?
-----
visit my website at http://www.phpscriptor.com/ http://www.phpscriptor.com/
--
View this message in context: http://www.nabble.com/Zend-DB-and-find-%28strange-behaviour%29-tp21888868p21888868.html
Sent from the Zend DB mailing list archive at Nabble.com.
没有评论:
发表评论