How to get current ‘select’ in the ‘afterFind’?
I have tried ‘[color="#444444"][font=“Arial, Helvetica, sans-serif”][size=“2”]getDbCriteria()->select[/size][/font][/color]’ in the afterFind, but not work.
Any idea?
How to get current ‘select’ in the ‘afterFind’?
I have tried ‘[color="#444444"][font=“Arial, Helvetica, sans-serif”][size=“2”]getDbCriteria()->select[/size][/font][/color]’ in the afterFind, but not work.
Any idea?
i test in blog demo:
protected function afterFind()
{
parent::afterFind();
$this->_oldTags=$this->tags;
var_dump($this->dbCriteria->select);
}
will output:
string(1) "*"
your test is not right. the output in your test is the default value.
you can build a test CDbCriteria with the ‘select’=>array(‘id’), here also output *, but not the right one(‘id’ or array(‘id’)).
this the problem.