python插入mysql新值

python插入mysql新值
#Server Connection to MySQL:

import MySQLdb
conn = MySQLdb.connect(host= "localhost",
                  user="root",
                  passwd="newpassword",
                  db="engy1")
x = conn.cursor()

try:
   x.execute("""INSERT INTO anooog1 VALUES (%s,%s)""",(188,90))
   conn.commit()
except:
   conn.rollback()

conn.close()
python插入mysql新值

python插入mysql新值,布布扣,bubuko.com

python插入mysql新值

上一篇:自己动手构造编译系统:编译、汇编与链接2.1 编译程序的设计


下一篇:sql 如何更改表的字段属性