From c285e8dc7626196cd0f50343845c0ba1f25ed0ba Mon Sep 17 00:00:00 2001 From: Andrew Gundersen Date: Fri, 12 Feb 2021 14:24:05 -0600 Subject: [PATCH] db changes --- db.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/db.py b/db.py index 9b72d8e..6ad55cd 100644 --- a/db.py +++ b/db.py @@ -3,24 +3,22 @@ import mysql.connector # database settings -DBUSER = "remoteAccess" -DBPASSWORD = "remoteAccess2020" +DBUSER = "gundersena" +DBPASSWORD = "remoteaccess" DBHOST = "75.86.178.105" -# People Schema -# ------------- -people_cnx = mysql.connector.connect(user=DBUSER, password=DBPASSWORD, host=DBHOST, database="People") -people_cursor = people_cnx.cursor(buffered=True) +cnx = mysql.connector.connect(user=DBUSER, password=DBPASSWORD, host=DBHOST, database="accounts") +cursor = cnx.cursor(buffered=True) # Verify that an email is a valid crimata_id. def verify(crimata_id, get=False): - query = (f"SELECT * FROM People.users WHERE crimata_id='{crimata_id}';") + query = f"SELECT * FROM accounts.accounts WHERE crimata_id='{crimata_id}';" - people_cursor.execute(query) + cursor.execute(query) verified = False - for (_, crimata_id, _) in people_cursor: + for (_, crimata_id, _) in cursor: verified = True return verified \ No newline at end of file -- 2.43.0