esler
(Alex Caldas)
1
Hi,
I have a created_at field.
I want to send the created_start and created_end to do something like.
created_at >= created_start
created_at <= created_end
but i receive the /Developer/YII/framework/db/ar/CActiveRecord.php(129): CComponent->__get("created_start")
how can i send those search atributes and get on the search method.
$criteria->compare(‘created_at’,’>=’, $this->created_start,true);
$criteria->compare(‘created_at’,’<’, $this->created_end,true);
W
abennouna
(Abennouna)
2
In your model, add
public $created_start;
public $created_end;
esler
(Alex Caldas)
3
Thanks, now it seems that in the other side i dont receive the param correctly.
There’s a way to debug the data received on the search method and send to a file?
Thanks
abennouna
(Abennouna)
5
Hmmm maybe you need also to add them in the safe array in your model validation rules? How did you finally solve it please?