如何打印sql語句的執行結果_python

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