you may be missing db.commit().
When you do insert, update, etc.. you call commit() to make the changes stick.

-sk

On 7/28/06, Kent Johnson < [EMAIL PROTECTED]> wrote:
Ron Phillips wrote:
> I am trying to write a script that adds data to a table using
> MySQLdb.py.  For some reason, "INSERT" seems to work temporarily. I
> run a command to insert a row, and then do a select query, and it's
> there. After the program shuts down, though, it's gone. No rows are
> permanently created. SELECT works fine from MySQLdb, CREATE TABLE too,
> but when I add data, it's only there while the script is executing,
> then it's gone.
Try calling conn.commit() before conn.close (). IIRC older versions of
MySQL were set to auto-commit by default but newer versions require the
explicit commit.

Kent

_______________________________________________
Tutor maillist  -   [email protected]
http://mail.python.org/mailman/listinfo/tutor

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to