Python中MySQLdb的各种常见用法
摘要:
Python代码#-*-coding:utf-8-*-#mysqldbimporttime,MySQLdb#连接conn=MySQLdb.connect(host="localhost",user="root",passwd="",db="test",charset="utf8")cursor=conn.cursor()#写入sql="insertintouser(name,created)values(%s,%s)"param=("aaa",int(ti 阅读全文
posted @ 2012-12-24 16:17 linzuxin 阅读(374) 评论(0) 推荐(0) 编辑