Index: openacs-4/packages/acs-admin/www/users/session-history.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/Attic/session-history.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-admin/www/users/session-history.tcl 27 Jun 2015 16:41:08 -0000 1.4 +++ openacs-4/packages/acs-admin/www/users/session-history.tcl 7 Aug 2017 23:47:45 -0000 1.5 @@ -22,10 +22,16 @@ # we have to query for pretty month and year separately because Oracle pads # month with spaces that we need to trim -set selection [ns_db select $db "select to_char(entry_date,'YYYYMM') as sort_key, rtrim(to_char(entry_date,'Month')) as pretty_month, to_char(entry_date,'YYYY') as pretty_year, sum(session_count) as total_sessions, sum(repeat_count) as total_repeats -from session_statistics -group by to_char(entry_date,'YYYYMM'), to_char(entry_date,'Month'), to_char(entry_date,'YYYY') -order by 1"] +set selection [ns_db select $db { + select to_char(entry_date,'YYYYMM') as sort_key, + rtrim(to_char(entry_date,'Month')) as pretty_month, + to_char(entry_date,'YYYY') as pretty_year, + sum(session_count) as total_sessions, + sum(repeat_count) as total_repeats + from session_statistics + group by to_char(entry_date,'YYYYMM'), to_char(entry_date,'Month'), to_char(entry_date,'YYYY') + order by 1 +}] set last_year "" while { [ns_db getrow $db $selection] } { @@ -57,3 +63,9 @@ " db_release_unused_handles ns_return 200 text/html $whole_page + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: