Craft\RetourService::getRecentStatistics PHP Method

getRecentStatistics() public method

public getRecentStatistics ( $days = 1, $handled ) : array
$days The number of days to get
return array Recent statistics
    public function getRecentStatistics($days = 1, $handled)
    {
        $handled = (int) $handled;
        if (!$handled) {
            $handled = 0;
        }
        $result = craft()->db->createCommand()->select('*')->from('retour_stats')->where("hitLastTime >= ( CURDATE() - INTERVAL '{$days}' DAY )")->andWhere('handledByRetour =' . $handled)->order('hitLastTime DESC')->queryAll();
        return $result;
    }