Convert id to rowid

Signed-off-by: Etzelia <etzelia@hotmail.com>
develop
Etzelia 2019-08-16 12:15:30 -05:00
parent dd66a714c6
commit 6b8617fe02
No known key found for this signature in database
GPG Key ID: 3CAEB74806C4ADE5
2 changed files with 13 additions and 13 deletions

View File

@ -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)

24
gui.py
View File

@ -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}