I am writing a function within the php of the model. Is there any issue with using
$this->field('something)
while inside the model? I can use other things lik开发者_JS百科e $this->saveField(...) fine but for some reason this is not returning me the value in the table correctly. Just wanted to make sure, thanks!
You have to specify the conditions first, like so:
$this->field('field_name', $conditions);
Or, I think you can also try setting the id first
$this->id = $id;
$this->field('field_name');
精彩评论