From 6b8617fe02b959eb5f6e1c5c83bdfb11a2edfa57 Mon Sep 17 00:00:00 2001 From: Etzelia Date: Fri, 16 Aug 2019 12:15:30 -0500 Subject: [PATCH] Convert id to rowid Signed-off-by: Etzelia --- activity.py | 2 +- gui.py | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/activity.py b/activity.py index f9b27f1..7179609 100644 --- a/activity.py +++ b/activity.py @@ -34,7 +34,7 @@ def activity_results(form): query = '''SELECT 0 AS id, cs.time AS unix, cu.user AS player, cs.action FROM co_session cs - JOIN co_user cu ON cs.user = cu.id + JOIN co_user cu ON cs.user = cu.rowid {players} '''.format(players=players_clause) diff --git a/gui.py b/gui.py index c5b8bde..122a1ec 100644 --- a/gui.py +++ b/gui.py @@ -140,9 +140,9 @@ def gui_results(form): queries.append('''SELECT 0 AS id, "block" AS type, cb.time AS unix, cu.user AS player, cb.action, cmm.material AS data, cb.x, cb.y, cb.z, cw.world FROM co_block cb - JOIN co_user cu ON cb.user = cu.id - JOIN co_material_map cmm ON cb.type = cmm.id - JOIN co_world cw ON cb.wid = cw.id + JOIN co_user cu ON cb.user = cu.rowid + JOIN co_material_map cmm ON cb.type = cmm.rowid + JOIN co_world cw ON cb.wid = cw.rowid WHERE cb.action IN ({action}) {ignore_environment} {players} @@ -157,7 +157,7 @@ def gui_results(form): queries.append('''SELECT 0 AS id, "chat" AS type, cc.time AS unix, cu.user AS player, "" AS action, cc.message AS data, "" AS x, "" AS y, "" AS z, "" AS world FROM co_chat cc - JOIN co_user cu ON cc.user = cu.id + JOIN co_user cu ON cc.user = cu.rowid WHERE 1 = 1 {players} {time} @@ -168,9 +168,9 @@ def gui_results(form): queries.append('''SELECT 0 AS id, "container" AS type, cc.time AS unix, cu.user AS player, cc.action, cc.amount || " " || cmm.material AS data, cc.x, cc.y, cc.z, cw.world FROM co_container cc - JOIN co_user cu ON cc.user = cu.id - JOIN co_material_map cmm ON cc.type = cmm.id - JOIN co_world cw ON cc.wid = cw.id + JOIN co_user cu ON cc.user = cu.rowid + JOIN co_material_map cmm ON cc.type = cmm.rowid + JOIN co_world cw ON cc.wid = cw.rowid WHERE 1 = 1 {worlds} {players} @@ -183,7 +183,7 @@ def gui_results(form): queries.append('''SELECT 0 AS id, "command" AS type, cc.time AS unix, cu.user AS player, "" AS action, cc.message AS data, "" AS x, "" AS y, "" AS z, "" AS world FROM co_command cc - JOIN co_user cu ON cc.user = cu.id + JOIN co_user cu ON cc.user = cu.rowid WHERE 1 = 1 {players} {coords} @@ -195,8 +195,8 @@ def gui_results(form): queries.append('''SELECT 0 AS id, "session" AS type, cs.time AS unix, cu.user AS player, cs.action, "" AS data, cs.x, cs.y, cs.z, cw.world FROM co_session cs - JOIN co_user cu ON cs.user = cu.id - JOIN co_world cw ON cs.wid = cw.id + JOIN co_user cu ON cs.user = cu.rowid + JOIN co_world cw ON cs.wid = cw.rowid WHERE 1 = 1 {worlds} {players} @@ -209,8 +209,8 @@ def gui_results(form): queries.append('''SELECT 0 AS id, "sign" AS type, cs.time AS unix, cu.user AS player, "" AS action, cs.line_1 || "|" || cs.line_2 || "|" || cs.line_3 || "|" || cs.line_4 AS data, cs.x, cs.y, cs.z, cw.world FROM co_sign cs - JOIN co_user cu ON cs.user = cu.id - JOIN co_world cw ON cs.wid = cw.id + JOIN co_user cu ON cs.user = cu.rowid + JOIN co_world cw ON cs.wid = cw.rowid WHERE 1 = 1 {worlds} {players}