dalongxia/remote_sync/tmp_probe_mysql2.py
2026-03-04 13:25:48 +08:00

15 lines
771 B
Python

import pymysql
hid='26de2902-8c28-4ba9-97d4-167609043fcc'
conn=pymysql.connect(host='218.93.191.20',port=3306,user='read_only_jiansun',password='^9B%@iQJESZrR!',db='jiansunblueprint',charset='utf8mb4',autocommit=True)
cur=conn.cursor()
cur.execute('select id,hid,url,orderNum from missiontask_instructions where hid=%s order by orderNum asc limit 20',(hid,))
print('instructions',len(cur.fetchall()))
cur.execute('select id,hid,url,orderNum,videoId from missiontask_video where hid=%s order by orderNum asc limit 20',(hid,))
rows=cur.fetchall()
print('video',len(rows))
for r in rows[:5]:
print(r)
cur.execute('select id,picture,pictureId,skucodes,withInstructions,withVideo from missiontask where id=%s',(hid,))
print('task',cur.fetchone())
cur.close();conn.close()