关于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].
相关文章
相关标签/搜索