im_new_registrants db { coverage " " } { report_date " " } { purpose " " }What it does:
Returns the number of people who've registered over a period of timeDefined in: /web/philip/tcl/intranet-status-report-defs.tcl
Source code:
set selection [ns_db 1row $db "select count(1) as num_users, sysdate-[util_decode $coverage "" 1 $coverage] as end_date, sysdate as todays_date from users where registration_date > to_date([util_decode $report_date "" sysdate "'$report_date'"], 'YYYY-MM-DD')-[util_decode $coverage "" 1 $coverage]"] set_variables_after_query if { [empty_string_p $report_date] } { set report_date $todays_date } return "[util_decode $num_users 0 "No new registrants" 1 "1 new registrant" "$num_users new registrants"] in period [util_IllustraDatetoPrettyDate $end_date] - [util_IllustraDatetoPrettyDate $report_date].\n"