diff --git a/.gitignore b/.gitignore index 894a44cc066a027465cd26d634948d56d13af9af..c47c59b4f062ef68a6ecbb7a1e3149101c10d31f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,10 @@ __pycache__/ *.py[cod] *$py.class +*.csv +*.xlsx +*.txt +*.mp3 # C extensions *.so diff --git a/u_tool/u_mysql.py b/u_tool/u_mysql.py index 33b581aa52f755b00970b1ec8060af6439da8bac..946ac9a88f89120de57dc9ff7f43bfd4f9fd7860 100644 --- a/u_tool/u_mysql.py +++ b/u_tool/u_mysql.py @@ -69,7 +69,7 @@ class MySQL: try: self.open() self.cur.execute("%s;" % sql, L) - self.cur.fetchall() + result = self.cur.fetchall() print("ok") msg = "success" except Exception as e: @@ -80,4 +80,4 @@ class MySQL: finally: self.close() # 返回统一状态 - return msg \ No newline at end of file + return result, msg