fix: Typo in save data
This commit is contained in:
parent
a0bb9dc032
commit
c0193337bb
4
db.py
4
db.py
@ -109,12 +109,12 @@ def get_website_data(domain):
|
|||||||
return ""
|
return ""
|
||||||
return data[0][2]
|
return data[0][2]
|
||||||
|
|
||||||
def update_website_data(domain):
|
def update_website_data(domain,data):
|
||||||
connection = mysql.connector.connect(**dbargs)
|
connection = mysql.connector.connect(**dbargs)
|
||||||
cursor = connection.cursor()
|
cursor = connection.cursor()
|
||||||
cursor.execute("""
|
cursor.execute("""
|
||||||
UPDATE site SET data = %s WHERE domain = %s
|
UPDATE site SET data = %s WHERE domain = %s
|
||||||
""", (domain, domain))
|
""", (data, domain))
|
||||||
connection.commit()
|
connection.commit()
|
||||||
cursor.close()
|
cursor.close()
|
||||||
connection.close()
|
connection.close()
|
Loading…
Reference in New Issue
Block a user