diff --git a/src/main/kotlin/net/taehui/twilight/system/DB.kt b/src/main/kotlin/net/taehui/twilight/system/DB.kt index 7040123..c79caae 100644 --- a/src/main/kotlin/net/taehui/twilight/system/DB.kt +++ b/src/main/kotlin/net/taehui/twilight/system/DB.kt @@ -2280,7 +2280,8 @@ when (src) { 0 -> """ SELECT COUNT(Comment_ID) AS Total_Count, COUNT(DISTINCT tw_comment.Note_ID, Avatar) AS Top_Count, COUNT(DISTINCT tw_note.Note_ID) AS Note_Count - INNER JOIN tw_comment USING(Note_ID) + FROM tw_comment + INNER JOIN tw_note USING(Note_ID) WHERE MATCH(Title) AGAINST(? IN BOOLEAN MODE) """.trimIndent() @@ -2294,13 +2295,15 @@ 2 -> """ SELECT COUNT(Comment_ID) AS Total_Count, COUNT(DISTINCT tw_comment.Note_ID, Avatar) AS Top_Count, COUNT(DISTINCT tw_note.Note_ID) AS Note_Count - INNER JOIN tw_comment USING(Note_ID) + FROM tw_comment + INNER JOIN tw_note USING(Note_ID) WHERE MATCH(Artist) AGAINST(? IN BOOLEAN MODE) """.trimIndent() 3 -> """ SELECT COUNT(Comment_ID) AS Total_Count, COUNT(DISTINCT tw_comment.Note_ID, Avatar) AS Top_Count, COUNT(DISTINCT tw_note.Note_ID) AS Note_Count - INNER JOIN tw_comment USING(Note_ID) + FROM tw_comment + INNER JOIN tw_note USING(Note_ID) WHERE MATCH(Genre) AGAINST(? IN BOOLEAN MODE) """.trimIndent()