Just wondering if anyone has done this before. I'm trying to get Optigold to import usage stats from a server running the latest ver of FreeRadius and MySQL. The date format doesn't seem to match up between the radacct table and Optigold's "SQL Statement to View Usage History" I've been using PuTTY to login and run an SQL query to get usage info up to this point. (Serious pain in the neck)
Date example: 2004-03-30 13:15:09 Here's an SQL query I had tried for the monthly usage: SELECT login,count(login),sum(seconds),sum(bandwidth) FROM usagetable WHERE date >= '<Y1>-<M1>-<D1>' AND date <= '<Y2>-<M2>-<D2>' GROUP BY login I think the hh:mm:ss format is throwing it off.
If that's the case, you could hard code a time... like so: SELECT login,count(login),sum(seconds),sum(bandwidth) FROM usagetable WHERE date >= '<Y1>-<M1>-<D1> 00:00:00' AND date <= '<Y2>-<M2>-<D2> 00:00:00' GROUP BY login Code (markup):