소스 검색

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()