import MySQLdb
db = MySQLdb.connect(host="localhost", user="root", passwd="", db="demo")
c = db.cursor()
max_price = 5
c.execute("""SELECT * FROM think_node""")
r = c.fetchone()
print(r)
python 使用mysqlClient 连接mysql
import MySQLdb
db = MySQLdb.connect(host="localhost", user="root", passwd="", db="demo")
c = db.cursor()
max_price = 5
c.execute("""SELECT * FROM think_node""")
r = c.fetchone()
print(r)
python 使用mysqlClient 连接mysql