python sql語句執行結果打印

db=MySQLdb.connect(host=’localhost’,user=’root’, passwd=’xxxxx’,db=’dbname’)  cur=db.cursor()  cur.execute(‘select * from records’)app 打印全部執行結果 rs=cur.fetchall()  for r in rs:  print rfetch 打印一條數據的全部字
相關文章
相關標籤/搜索