MySQLdb UPDATE does nothing
Simon Brunning
simon.brunning at gmail.com
Thu Sep 15 08:09:54 EDT 2005
On 9/15/05, John Moore <john at jmsd.co.uk> wrote:
> ... my main concern is that the UPDATE sql doesn't actually
> work, and I can't understand why.
You probable need to commit your changes. Try a cursor.commit() call.
If all the changes make up one logical transaction, do the commit at
the end of the loop. Otherwise, do one after each update. (What does a
logical transaction consist of? Only you can answer that! It's a
domain question. A transaction is a set of changes that should be
applied atomically - i.e., you want them all to happen, or none of
them.)
--
Cheers,
Simon B,
simon at brunningonline.net,
http://www.brunningonline.net/simon/blog/
More information about the Python-list
mailing list