library/tables-overall-users-login.php
RADIUS web management application
Brought to you by:
lirantal
Daily functions it's grouping days of deferents months
ORGIGINAL CODE:
$sql = SELECT UserName, count(AcctStartTime), DAY(AcctStartTime) AS Day FROM ".
$configValues['CONFIG_DB_TBL_RADACCT']." WHERE username='$username' AND acctstoptime>0 GROUP BY Day
Modified CODE:
$sql = SELECT UserName, count(AcctStartTime), DAY(AcctStartTime) AS Day FROM ".
$configValues['CONFIG_DB_TBL_RADACCT']." WHERE username='$username' AND acctstoptime>0 AND AcctStartTime>DATE_SUB(curdate(),INTERVAL (DAY(curdate())+30) DAY) AND AcctStartTime< now() GROUP BY Day
Anonymous
Sorry i forgot " ORDER BY $orderBy $orderType" statement
Modified CODE:
$sql = "SELECT UserName, count(AcctStartTime), DAY(AcctStartTime) AS Day FROM ".
$configValues['CONFIG_DB_TBL_RADACCT']." WHERE username='$username' AND acctstoptime>0 AND AcctStartTime>DATE_SUB(curdate(),INTERVAL (DAY(curdate())+30) DAY) AND AcctStartTime< now() GROUP BY Day ORDER BY $orderBy $orderType;";
Right but the point is showing exactly that.. the user's login through-out all the days in general, not for a specific month...
Ok I've inderstood, but I think is more useful get a detailed grapth by day of last month, same for monthly graphs, you must need wait at leat two years for get a real mean.
So i've changed
Daily Graph--> last month
Monthly Graph--> last year
Regards