From 396f7d9d4af7eeb3af838c13c1e84296629ee21f Mon Sep 17 00:00:00 2001 From: Matteo Nastasi Date: Tue, 28 Apr 2020 18:06:17 +0200 Subject: [PATCH] add match check on ttype to generate ranking just on certified and guaranteed users --- web/briskin5/statadm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/briskin5/statadm.php b/web/briskin5/statadm.php index d9e1b65..7e4284e 100644 --- a/web/briskin5/statadm.php +++ b/web/briskin5/statadm.php @@ -184,7 +184,7 @@ function main_pgsql($curtime) // TAG: POINTS_MANAGEMENT $pla_sql = sprintf("SELECT (float4(sum(p.pts)) * 100.0 ) / float4(count(p.pts)) as score, sum(p.pts) as points, count(p.pts) as games, u.code as ucode, u.login as login FROM %sbin5_points as p, %sbin5_games as g, %sbin5_matches as m, %susers as u - WHERE (m.tcode = %d OR m.tcode = %d) AND m.code = g.mcode AND + WHERE m.ttype <= 2 AND (m.tcode = %d OR 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 AND -- 2.17.1