That was it all right! Thanks, Kent!
 
Ron
___________________
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  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to