From 091468985eab9f4ac34e0b60a0b8b5c367341c0f Mon Sep 17 00:00:00 2001 From: jude-lafitteIII Date: Wed, 20 May 2020 23:53:07 +0100 Subject: [PATCH] moved around the order by statements so that it orders correctly --- src/sound.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sound.rs b/src/sound.rs index eac9e02..a435581 100644 --- a/src/sound.rs +++ b/src/sound.rs @@ -96,9 +96,9 @@ SELECT name, id, plays, public, server_id, uploader_id uploader_id = ? OR server_id = ? ) - ORDER BY rand(), public = 1, server_id = ?, uploader_id = ? + ORDER BY uploader_id = ? DESC, server_id = ? DESC, public = 1 DESC, rand() ", - name, user_id, guild_id, guild_id, user_id + name, user_id, guild_id, user_id, guild_id ) .fetch_all(&db_pool) .await?;