statadm.php: add constraint to count number of games with results <> 0 only
[brisk.git] / web / briskin5 / statadm.php
index f1c7bfc..4eb267b 100644 (file)
@@ -341,7 +341,8 @@ function main_pgsql($curtime)
                                 WHERE m.tcode = %d AND m.code = g.mcode AND
                                       ( (u.type & (CAST (X'ff0000' as integer))) <> (CAST (X'800000' as integer)) ) AND
                                       g.tstamp > to_timestamp(%d) AND g.tstamp <= to_timestamp(%d) AND
-                                      p.ucode = u.code AND p.gcode = g.code
+                                      p.ucode = u.code AND p.gcode = g.code AND
+                                      p.pts != 0
                                 GROUP BY u.code, u.login
                                 ORDER BY (float4(sum(p.pts)) * 100.0 ) /  float4(count(p.pts)) DESC, 
                                          count(p.pts) DESC",