There is a bug in MySQL-python-1.2.0-1 on Fedora Core 4. When you connect to an external database and execute an "INSERT" query, the database returns "TRUE", but the new record is inserted and then immediately deleted from the table. If you are automatically incrementing an ID field, the ID gets incremented, but the record is missing. In other words, INSERT does not work. I am using the 32-bit and 64-bit versions of Fedora Core 4. Previous versions work fine on Red Hat.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, upon further reading, this is NOT a bug. Auto-commit is off by default in 1.2.0-1. So, you have to use the following commands after your you execute your query: db.commit()
db.close()
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is a bug in MySQL-python-1.2.0-1 on Fedora Core 4. When you connect to an external database and execute an "INSERT" query, the database returns "TRUE", but the new record is inserted and then immediately deleted from the table. If you are automatically incrementing an ID field, the ID gets incremented, but the record is missing. In other words, INSERT does not work. I am using the 32-bit and 64-bit versions of Fedora Core 4. Previous versions work fine on Red Hat.
pingdavid2,
Thank you very much for saving me hours of headache on this problem.
OK, upon further reading, this is NOT a bug. Auto-commit is off by default in 1.2.0-1. So, you have to use the following commands after your you execute your query: db.commit()
db.close()