protected function getMonth()
    {
        $arrMonth = array();
        $objMonth = \Database::getInstance()->prepare("SELECT
                                                         FROM_UNIXTIME(`tstamp`,'%Y-%m')  AS YM
                                                       , COUNT(`id`) AS SUMDL
                                                       FROM `tl_dlstatdets`
                                                       WHERE 1
                                                       GROUP BY YM
                                                       ORDER BY YM DESC")
                                            ->limit(12)
                                            ->execute();
        $intRows = $objMonth->numRows;
        if ($intRows>0)
        {
            while ($objMonth->next())
            {
                $Y = substr($objMonth->YM, 0,4);
                $M = (int)substr($objMonth->YM, -2);
                $arrMonth[] = array($Y.' '.$GLOBALS['TL_LANG']['MONTHS'][($M - 1)], $this->getFormattedNumber($objMonth->SUMDL,0) );
            }
        }

        return $arrMonth;
    }
protected function getMonth()
    {
        $arrMonth = array();
        $objMonth = \Database::getInstance()->prepare("SELECT
                                                         FROM_UNIXTIME(`tstamp`,'%Y-%m')  AS YM
                                                       , COUNT(`id`) AS SUMDL
                                                       FROM `tl_dlstatdets`
                                                       WHERE 1
                                                       GROUP BY YM
                                                       ORDER BY YM DESC")
                                            ->limit(12)
                                            ->execute();
        $intRows = $objMonth->numRows;
        if ($intRows>0)
        {
            while ($objMonth->next())
            {
                $Y = substr($objMonth->YM, 0,4);
                $M = (int)substr($objMonth->YM, -2);
                $arrMonth[] = array($Y.' '.$GLOBALS['TL_LANG']['MONTHS'][($M - 1)], $this->getFormattedNumber($objMonth->SUMDL,0) );
            }
        }

        return $arrMonth;
    }
protected function getMonth ( ) { $ arrMonth = array ( ) ; $ objMonth = \ Database :: getInstance ( ) -> prepare ( "SELECT
                                                         FROM_UNIXTIME(`tstamp`,'%Y-%m')  AS YM
                                                       , COUNT(`id`) AS SUMDL
                                                       FROM `tl_dlstatdets`
                                                       WHERE 1
                                                       GROUP BY YM
                                                       ORDER BY YM DESC" ) -> limit ( 12 ) -> execute ( ) ; $ intRows = $ objMonth -> numRows ; if ( $ intRows > 0 ) { while ( $ objMonth -> next ( ) ) { $ Y = substr ( $ objMonth -> YM , 0 , 4 ) ; $ M = ( int ) substr ( $ objMonth -> YM , - 2 ) ; $ arrMonth [ ] = array ( $ Y . ' ' . $ GLOBALS [ 'TL_LANG' ] [ 'MONTHS' ] [ ( $ M - 1 ) ] , $ this -> getFormattedNumber ( $ objMonth -> SUMDL , 0 ) ) ; } } return $ arrMonth ; }
Monthly Statistics, last 12 Months
@return array
Monthly Statistics last 12 Months