X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fbriskin5%2Fstat-day.php;h=c8af36d06e7e4a6f05b63f0da9d2b691850c01be;hb=11db89bea184692bb92f825fee4de9d96dd47a5b;hp=caf3e0ab1a72949ed7b5e1eb93de013c8d7cef07;hpb=6acb2dcb00c9add71c78be1e9b5b42d75cf2379a;p=brisk.git diff --git a/web/briskin5/stat-day.php b/web/briskin5/stat-day.php index caf3e0a..c8af36d 100644 --- a/web/briskin5/stat-day.php +++ b/web/briskin5/stat-day.php @@ -427,7 +427,8 @@ function main_pgsql($from, $to) fprintf($fpexp, ""); for ($u = 0 ; $u < BIN5_PLAYERS_N ; $u++) { $tot_sql = sprintf(" -SELECT SUM(p.pts) AS pts FROM %sbin5_matches AS m, %sbin5_games AS g, %sbin5_points AS p, %susers AS u WHERE m.code = g.mcode AND g.code = p.gcode AND u.code = p.ucode AND m.code = %d AND u.code = %d", $G_dbpfx, $G_dbpfx, $G_dbpfx, $G_dbpfx, +SELECT SUM(p.pts) AS pts FROM %sbin5_matches AS m, %sbin5_games AS g, %sbin5_points AS p, %susers AS u +WHERE m.code = g.mcode AND g.code = p.gcode AND u.code = p.ucode AND ( (u.type & (CAST (X'00ff0000' as integer))) <> (CAST (X'00800000' as integer)) ) AND m.code = %d AND u.code = %d", $G_dbpfx, $G_dbpfx, $G_dbpfx, $G_dbpfx, $tmt_obj->code, $users[$u]['code']); if (($tot_pg = pg_query($bdb->dbconn->db(), $tot_sql)) == FALSE ) { break;