Changeset 699
- Timestamp:
- Feb 22, 2016, 10:09:57 AM (5 years ago)
- Location:
- lliurex-analytics-server/trunk/fuentes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-analytics-server/trunk/fuentes/debian/changelog
r352 r699 1 lliurex-analytics-server (0.0.5) xenial; urgency=medium 2 3 * Fixed bugs: Current month is not displayed, rotation stops when year change. 4 5 -- M.Angel Juan <m.angel.juan@gmail.com> Mon, 22 Feb 2016 10:00:49 +0100 6 1 7 lliurex-analytics-server (0.0.4) xenial; urgency=medium 2 8 -
lliurex-analytics-server/trunk/fuentes/lliurex-analytics-server/usr/lib/analytics-server/analytics/db.php
r350 r699 66 66 function rotate(){ 67 67 $sql="select max(fecha) from historico;"; 68 $thismonth=intval(date(" m"));68 $thismonth=intval(date("Ym")); 69 69 $lastmonth=$thismonth; 70 70 if ($result=$this->dbconn->query($sql)){ … … 78 78 $query->close(); 79 79 }else{ 80 $lastmonth=intval(explode('-',$row[0])[ 1]);80 $lastmonth=intval(explode('-',$row[0])[0].explode('-',$row[0])[1]); 81 81 } 82 82 } … … 99 99 //echo $today.' '.$first_this_month.' '.$first_one_month_ago.' '.$last_one_month_ago.' '.$first_two_month_ago.' '.$last_two_month_ago.' EOL'; 100 100 $obj=[]; 101 $sql="SELECT app,count ,fechafrom historico where fecha BETWEEN '$first_this_month' and '$today' order by count DESC LIMIT 30";101 $sql="SELECT app,count from packages UNION SELECT app,count from historico where fecha BETWEEN '$first_this_month' and '$today' order by count DESC LIMIT 30"; 102 102 if ($result=$this->dbconn->query($sql)){ 103 103 $obj2=[];
Note: See TracChangeset
for help on using the changeset viewer.