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