Fixes in sql and ausers
This commit is contained in:
parent
06b42239d9
commit
3d2eb64808
6 changed files with 71 additions and 28 deletions
|
|
@ -97,18 +97,22 @@ class SqlClass:
|
|||
pymysql.install_as_MySQLdb
|
||||
SqlClass.pymysql_install=True
|
||||
|
||||
self.conn=pymysql.connect(self.connection['host'],
|
||||
user=self.connection['user'],
|
||||
passwd=self.connection['password'],
|
||||
db=self.connection['db'],
|
||||
charset='utf8mb4',
|
||||
cursorclass=pymysql.cursors.DictCursor)
|
||||
"""
|
||||
connection = pymysql.connect(host='localhost',
|
||||
user='user',
|
||||
password='passwd',
|
||||
database='db',
|
||||
charset='utf8mb4',
|
||||
cursorclass=pymysql.cursors.DictCursor)
|
||||
"""
|
||||
|
||||
self.conn=pymysql.connect(host=self.connection['host'], user=self.connection['user'], passwd=self.connection['password'], db=self.connection['db'], charset='utf8mb4', cursorclass=pymysql.cursors.DictCursor)
|
||||
|
||||
else:
|
||||
|
||||
import MySQLdb.cursors
|
||||
|
||||
self.conn=MySQLdb.connect(self.connection['host'],
|
||||
self.conn=MySQLdb.connect(host=self.connection['host'],
|
||||
user=self.connection['user'],
|
||||
passwd=self.connection['password'],
|
||||
db=self.connection['db'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue