summaryrefslogtreecommitdiff
path: root/src/database.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/database.rs')
-rw-r--r--src/database.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/database.rs b/src/database.rs
index ecb88d0..a5204a1 100644
--- a/src/database.rs
+++ b/src/database.rs
@@ -156,9 +156,9 @@ pub async fn match_users(lobby: String, names: &[&str]) -> Result<String, Error>
JOIN suser USING (user_id)
JOIN track USING (track_id)
JOIN lobby USING (lobby_id)
- WHERE suser.user_name IN (SELECT * FROM users) AND token = $1
+ WHERE suser.user_name IN (SELECT user_name FROM users) AND token = $1
GROUP BY track_id
- HAVING COUNT(track_id) = (SELECT COUNT(*) FROM users)
+ ---HAVING COUNT(track_id) = (SELECT COUNT(*) FROM users)
ORDER BY SUM(score) DESC
) AS _ USING (track_id)
;