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 打印一条数据的全部字
相关文章
相关标签/搜索