I am trying to execute following similar type 2 sql queries. While one query is executing successfully but other is giving error
db = MySQLdb.Connection(host="192.168.1.90", port=3306, user="some", passwd="some", db="some")
cur = db.cursor()
cur.executemany("""INSERT INTO test (timepacket,model_no,cycle_time,target,plan,count,difference,bekido,linenumber,shift,runningstatus,remarks) VALUE (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)""", datater)
db.commit()
cur1 = db.cursor()
cur1.executemany("""INSERT INTO delay (running,change,nomaterial,breakdown,quality,noplan,line,shift) VALUE(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)""", datater1)
db.commit()
db.close()
The first query is working ok while second query is giving error
1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'change,nomaterial,breakdown,quality,noplan,line,shift) VALUE(507,0,0,0,0,0,1,1)' at line 1") Anyone can help me out why it is happening?