Consistent all-caps for SQL queries
This commit is contained in:
parent
06e33e1040
commit
00e470e45a
1 changed files with 2 additions and 2 deletions
|
@ -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()
|
||||
|
||||
|
|
Reference in a new issue