瀏覽代碼

Use select_db function to change current db.

Hoto Cocoa 5 年之前
父節點
當前提交
4bf72557fe
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app.py

+ 1 - 1
app.py

@@ -122,7 +122,7 @@ if set_data['db_type'] == 'mysql':
     except:
         pass
 
-    curs.execute(db_change('use ?'), set_data['db'])
+    conn.select_db(set_data['db'])
 else:
     conn = sqlite3.connect(set_data['db'] + '.db')
     curs = conn.cursor()