From b37573a371fed93612ceb6e0a8be5714a47b1c29 Mon Sep 17 00:00:00 2001 From: suti7yk5032 Date: Sun, 7 Jul 2024 18:15:15 +0900 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E5=8A=9B=E3=81=95=E3=82=8C=E3=82=8Bcs?= =?UTF-8?q?v=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=8C=E5=B1=A5?= =?UTF-8?q?=E6=AD=B4=E3=81=AEid=E9=A0=86=E3=81=A7=E4=B8=A6=E3=81=B6?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dislocker.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dislocker.py b/dislocker.py index 34170bf..b51be28 100644 --- a/dislocker.py +++ b/dislocker.py @@ -211,8 +211,9 @@ class Bot(discord.Client): # クエリを作成(列名を明確に指定) query = sql.SQL(""" SELECT {main_columns}, {related_table}.name - FROM {main_table} - LEFT JOIN {related_table} ON {main_table}.member_id = {related_table}.id + FROM {main_table} + LEFT JOIN {related_table} ON {main_table}.member_id = {related_table}.id + ORDER BY id """).format( main_columns=sql.SQL(', ').join([sql.SQL("{}.{}").format(sql.Identifier(main_table), sql.Identifier(col)) for col in main_columns]), main_table=sql.Identifier(main_table),