Commit 48201a87 authored by 崔为之's avatar 崔为之 💪🏽

Update project

parent 5aaf4c5b
......@@ -36,3 +36,11 @@ Scheduler:
Start: 2023-11-12 10:04:00
End: 2099-11-11 16:00:00
Timezone: Asia/Shanghai
ExtraDB:
Host: localhost
Port: 3306
User: root
Password: localhost123
DB: elp
Sql: select * from users;
......@@ -40,14 +40,14 @@ class MySQLHelper:
if self.conn:
self.conn.close()
if exc_type:
print(f"Error occurred: {exc_val}")
print(f'Error occurred: {exc_val}')
def execute(self, sql: str) -> Optional[tuple]:
"""
Execute the SQL statement and retrieve the results
"""
if not self.conn:
print("No connection available.")
print('No connection available.')
return None
try:
......@@ -58,5 +58,5 @@ class MySQLHelper:
return result
except Exception as e:
print(f"Error executing SQL: {e}")
print(f'Error executing SQL: {e}')
return None
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment