From 00e470e45a57d2b6ba2b49adcf7e905a9e9911e2 Mon Sep 17 00:00:00 2001 From: Corder Guy Date: Tue, 24 Apr 2018 14:18:42 -0500 Subject: [PATCH] Consistent all-caps for SQL queries --- mocha_server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mocha_server.py b/mocha_server.py index 83870db..c929896 100755 --- a/mocha_server.py +++ b/mocha_server.py @@ -24,7 +24,7 @@ def fetch_users(user_ids): cursor = conn.cursor() output = [] for user_id in user_ids: - cursor.execute('select * from users where user_id=(?)', (user_id, )) + cursor.execute('SELECT * FROM users WHERE user_id=(?)', (user_id, )) output += cursor.fetchall() output = json.dumps([dict(row) for row in output]) @@ -58,7 +58,7 @@ def insert_row(user_id, username): conn = sqlite3.connect(DATABASE) conn.row_factory = sqlite3.Row cursor = conn.cursor() - cursor.execute('insert into users values (?,?)', (user_id, username)) + cursor.execute('INSERT INTO users VALUES (?,?)', (user_id, username)) conn.commit() conn.close()