I am using python MySQL API to connect to Mysql database from python program. I am facing a problem from few days. I am unable to insert records into the database and dont k
I think your code should be fixed
cursor.execute( 'insert into documents(docid,docname) values(%d, %s)', (number,temp) )
and then You should add db.commit() before you close database connection.
db.commit()