/** * Timer table for query * @return string */ protected function timer() { if ($this->Year == parent::LAST_6_MONTHS || $this->Year == parent::LAST_12_MONTHS) { return '((WEEK(FROM_UNIXTIME(`time`),' . $this->WeekStart->mysqlParameter() . ') + ' . $this->timerEnd . ' - ' . $this->WeekStart->phpWeek() . ' - 1)%' . $this->timerEnd . ' + 1)'; } return 'WEEK(FROM_UNIXTIME(`time`),' . $this->WeekStart->mysqlParameter() . ')'; }