摘要: # -*- coding: utf-8 -*-import sysimport MySQLdbtry: conn=MySQLdb.connect(host="localhost",user="root",passwd="xxx")except Exception,e: print e sys.exit()#获取操作游标cursor=conn.cursor()#执行SQL,创建一个数据库. cursor.execute("""create database if not exists zhsen DEFAU 阅读全文
posted @ 2011-04-15 13:16 jumahe 阅读(1603) 评论(0) 推荐(0) 编辑