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()