This commit is contained in:
CHIEFSOFT\ameye
2024-12-08 18:44:12 -05:00
parent a102d20aa9
commit 3c381eefdf
+3 -2
View File
@@ -35,8 +35,9 @@ class Members:
def get_by_username(self, username): def get_by_username(self, username):
"""Get a user by username""" """Get a user by username"""
print(db) print(db)
sqv = "SELECT * FROM members WHERE id=%s" # sqv = "SELECT * FROM members WHERE id=%s"
x=["1"] # x=["1"]
sqv = "SELECT * FROM members WHERE username='"+username+"'"
with db: with db:
with db.cursor() as cursor: with db.cursor() as cursor:
cursor.execute(sqv, x) cursor.execute(sqv, x)