Hello i have wierd problem
Im using Python version 2.6.6 and MYSQLdb API version (1, 2, 3, ‘gamma’, 1) on CentOS
When i want to update/insert some data to one table python return me 1 (true) but there is not data in mysql, when i put SAME query in phpmyadmin, everything works fine
Here is code
import MySQLdb
# make mysql connection
try:
db = MySQLdb.connect(host="192.168.0.*", port=3366, user="*", passwd="*", db="*")
except MySQLdb.Error, e:
print "Error %d: %s" % (e.args[0], e.args[1])
exit()
sql = cursor.execute("INSERT INTO `video` SET `title`='testera', `description`='', `featuredesc`='', `keyword`='', `location`='', `embed_code`='', `vPath`='', `vSize`='0', `vText`='', `videoUrl`='', `mod_filestatus`='', `mod_mode`='', `mod_external`=''")
print sql # giving me 1
So no errors, all ok, just not in db, and db/tabel/fields exists.
What to do, i dont have idea.
After completing ALL write/modify operations you should COMMIT so your data won’t got lost.
Try: