關於MySQLdb的一些新發現(使用python鏈接mysql的庫)

MySQLdb的文檔時經過python的工具自動將註釋生成的,因此文檔的可讀性不是很強。下面是經過其餘的文章發現的兩個比較好點的使用方式:html 1、 cursor.execute("select id,ip,port from db limit 5") for (id,ip,port) in cursor.fetchall():     print idpython 這樣比row[0][0].
相關文章
相關標籤/搜索