python连接数据库

db = pymysql.connect("host", "username", "*pass*","dbname", port)
cursor = db.cursor()
sql = "select id from arg_transaction where did=0 and bid>100000000000000"
cursor.execute(sql)

原文地址:https://www.cnblogs.com/StivenYang/p/13928442.html