public function getInterval( $data_start, $data_stop ){
$criteria = new CDbCriteria;
$criteria->condition = "date >= '$data_start' AND date <= '$data_stop'";
return $criteria;
}
$model = Object::model()->findAll(getInterval('2014-06-01','2014-06-30');