summaryrefslogtreecommitdiff
path: root/schema.sql
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-02-25 13:03:45 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-26 12:53:53 +0100
commit44c0cc0bbb11cd17a7c4833791784b0cb5dc6748 (patch)
tree7462e870da4dbfdba12d037f28c0767c4f84c7d7 /schema.sql
parentff59eb2239cadd10fb699ea13fe6630d5bd5cc88 (diff)
downloadserver-44c0cc0bbb11cd17a7c4833791784b0cb5dc6748.tar.gz
Count invites as active games in header.
Diffstat (limited to 'schema.sql')
-rw-r--r--schema.sql8
1 files changed, 8 insertions, 0 deletions
diff --git a/schema.sql b/schema.sql
index a3c0e2b..07c51bb 100644
--- a/schema.sql
+++ b/schema.sql
@@ -113,6 +113,14 @@ create view user_dynamic_view as
status = 1
and players.user_id = users.user_id
and active in ( players.role, 'Both', 'All' )
+ ) + (
+ select
+ count(*)
+ from
+ players
+ where
+ players.user_id = users.user_id
+ and players.is_invite
) as active,
is_banned
from