Commit d48639dd authored by litaolemo's avatar litaolemo

update

parent dce1234b
...@@ -197,9 +197,7 @@ and (dev.device_id is null or dev.device_id='') ...@@ -197,9 +197,7 @@ and (dev.device_id is null or dev.device_id='')
} }
} }
print("-------------------------------") print("-------------------------------")
db = pymysql.connect(host='172.16.40.158', port=4000, user='st_user', passwd='aqpuBLYzEV7tML5RPsN1pntUzFy',
db='jerry_prod')
cursor = db.cursor()
for res in sql_res: for res in sql_res:
print(res) print(res)
if res.ACTIVE_TYPE: if res.ACTIVE_TYPE:
...@@ -230,4 +228,11 @@ and (dev.device_id is null or dev.device_id='') ...@@ -230,4 +228,11 @@ and (dev.device_id is null or dev.device_id='')
) )
print(instert_sql) print(instert_sql)
# cursor.execute("set names 'UTF8'") # cursor.execute("set names 'UTF8'")
con_sql(instert_sql) db = pymysql.connect(host='172.16.40.158', port=4000, user='st_user', passwd='aqpuBLYzEV7tML5RPsN1pntUzFy',
db='jerry_prod')
cursor = db.cursor()
res = cursor.execute(instert_sql)
db.commit()
print(res)
# cursor.executemany()
db.close()
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