I want to insert the integers 188 and 90 in my MySQL database, but the following code doesn’t work:
import MySQLdb
conn = MySQLdb.connect(host= "localhost",
user="root",
passwd="newpassword",
db="engy1")
x = conn.cursor()
x.execute("SELECT * FROM anooog1")
x.execute (" INSERT INTO anooog1 VALUES ('%s','%s') ", (188,90))
row = x.fetchall()
Why doesn’t it work?
edit working for me:
table in mysql;