最新回答 / _aiyuan_haohao
import MySQLdbdb = MySQLdb.connect("localhost","root","123456","wyj",charset='utf8')cursor = db.cursor()sql = "select * from tabtest"cursor.execute(sql)data = cursor.fetchall()讀取到的數據都存在data中,只要多data進行循環就可以看到所有數據希望能幫到你
2018-04-09
最贊回答 / TOmAs4
如果你是用pycharm的話 建議你在pycharm里的File>setting>Project untitled>Project Interpreter>點擊右邊的+號? 然后搜索PyMySQL然后點擊左下角的Install 進行下載??
2018-04-01