Index: src/statrep.c
==================================================================
--- src/statrep.c
+++ src/statrep.c
@@ -334,12 +334,12 @@
all rows. */
stats_report_init_view();
@
Timeline Events
@ (%s(stats_report_label_for_type())) by User
db_multi_exec(
- "CREATE TEMP TABLE piechart(amt,label);"
- "INSERT INTO piechart SELECT count(*), ifnull(euser,user) FROM v_reports"
+ "CREATE TEMP VIEW piechart(amt,label) AS"
+ " SELECT count(*), ifnull(euser,user) FROM v_reports"
" GROUP BY ifnull(euser,user) ORDER BY count(*) DESC;"
);
if( db_int(0, "SELECT count(*) FROM piechart")>=2 ){
@