php - Limit visitors statistics to 30 days -
i trying edit great visitor statistics script (php/mysql) ghaffar khan (full script @ http://www.codeproject.com/articles/35570/site-statistics-with-php-and-mysql ) having hard time trying limit visitors shown in graph stats past 30 days. there unfortunately no instruction on how , i've been struggling far. here main script: <?php include("configuration.php"); $page = input($_get['page']) or die('error: missing page id'); mysql_select_db($database, $con); // total visits count $query='select count( * ) total '.$tablename.' section=\''.$page.'\''; $result = mysql_query($query); $row = mysql_fetch_array($result, mysql_num); $count = $row[0]; // unique visitors count $query='select count(distinct ip) '.$tablename.' section=\''.$page.'\''; $result = mysql_query($query); $row = mysql_fetch_array($result, mysql_num); $uniaqucount = $row[0]; mysql_close($con); /* graph rendering...