Changeset 775 for trunk/admin
- Timestamp:
- Apr 26, 2005, 10:47:16 PM (20 years ago)
- Location:
- trunk/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/images/monthly_stats.img.php
r766 r775 37 37 $imageHeight = 256; 38 38 $imageWidth = 512; 39 $sql = "SELECT DISTINCT COUNT(*), DAY(date) 40 FROM ".HISTORY_TABLE." 41 WHERE (YEAR(date) = ".$_GET['year']." AND MONTH(date) = ".$_GET['month']." ) 42 GROUP BY DATE_FORMAT(date,'%Y-%m-%d') DESC;"; 39 $sql = ' 40 SELECT DISTINCT COUNT(*) 41 , DAYOFMONTH(date) 42 FROM '.HISTORY_TABLE.' 43 WHERE YEAR(date) = '.$_GET['year'].' 44 AND MONTH(date) = '.$_GET['month'].' 45 GROUP BY DATE_FORMAT(date, \'%Y-%m-%d\') DESC 46 ;'; 43 47 44 48 //------------------------------------------------ Image definition … … 76 80 or die(mysql_errno().": ".mysql_error()."<BR>".$sql); 77 81 78 $days =array_fill(1,31,0); 82 $days = array(); 83 for ($i = 1; $i <= 31; $i++) 84 { 85 $days[$i] = 0; 86 } 87 79 88 while ($r = mysql_fetch_row($result)) 80 89 { 81 $days 90 $days[$r[1]]= $r[0]; 82 91 } 83 92 $o=0; -
trunk/admin/stats.php
r766 r775 66 66 $query = ' 67 67 SELECT DISTINCT COUNT(*) as p, 68 DA TE(date) as d,68 DAYOFMONTH(date) as d, 69 69 MONTH(date) as m, 70 70 YEAR(date) as y
Note: See TracChangeset
for help on using the changeset viewer.