/****************************************************************************** JN_getMonthlyUniques() Created 02.10.05 v0.4b ******************************************************************************/ function JN_getMonthlyUniques() { global $SI_tables,$tz_offset; $count = 0; $month = array(); $tmp = ''; $sql = "SELECT FROM_UNIXTIME(dt, '%Y') as year, FROM_UNIXTIME(dt, '%M') as month, FROM_UNIXTIME(dt, '%m') as monthnum, COUNT(DISTINCT remote_ip) as total FROM $SI_tables[stats] GROUP BY 1, 3 ORDER BY 1 DESC, 3 DESC"; $result = mysql_query($sql); $tmp = "\n"; $tmp .= "\t\n"; $tmp .= "\t\n"; while ($row = mysql_fetch_array($result)) { $tmp .= ''; } $tmp .= '
Uniques by Month
Month YearUniques
' . $row['month'] . ' ' . $row['year'] . '' . $row['total'] . '
'; return $tmp; }