private function getActiveDates() { $date = date("Y-m-d"); $f = new ARSelectFilter(); $f->setCondition(new AndChainCondition(array(gte(f('EyeExamSchedule.date'), $date), isnull(f('EyeExamSchedule.eyeExamRequestID'))))); $f->setGrouping(f('EyeExamSchedule.date')); $f->setLimit(self::ACTIVE_DATES_LIMIT); $timeList = ActiveRecordModel::getRecordSetFields('EyeExamSchedule', $f, array('date')); // as result is an array of arrays with single value $activeTimes = array(); foreach ($timeList as $id) { $activeTimes[] = $id['date']; } return $activeTimes; }