This repository has been archived on 2024-10-20. You can view files and clone it, but cannot push or open issues or pull requests.
2023-07-08 17:00:32 +01:00
|
|
|
#!/usr/bin/python3
|
|
|
|
import sqlite3
|
|
|
|
import os
|
|
|
|
|
|
|
|
userid = input("Insert ID: ")
|
|
|
|
changewhat = input("Change what value?: ")
|
|
|
|
towhat = input("What should " + changewhat + " be changed to?: ")
|
|
|
|
|
|
|
|
def get_db_connection():
|
|
|
|
conn = sqlite3.connect("database.db")
|
|
|
|
conn.row_factory = sqlite3.Row
|
|
|
|
return conn
|
|
|
|
|
|
|
|
conn = get_db_connection()
|
|
|
|
conn.execute("UPDATE users SET " + changewhat + " = ?"
|
|
|
|
" WHERE id = ?",
|
|
|
|
(str(towhat), userid))
|
|
|
|
conn.commit()
|
|
|
|
conn.close()
|
|
|
|
|
2023-06-29 19:21:18 +01:00
|
|
|
print("Success!")
|