[Zope] mysql auto_increment adding numbers on its own
Tue, 2 Oct 2001 20:34:14 -0400
I have a ZSQL Method that uses MySQL's auto_increment and LAST_INSERT_ID()
features to return the next order number. After my Python Script runs the
zsql method to obtain the number, it proceeds to encrypt the order and
updates the newly added MySQL record to include the encrypted text.
This normally works okay, but somewhat regularly, and for no apparent
reason, I end up with anywhere from 1 to 3 records in a row with
auto_incremented numbers, but are null where there is normally the encrypted
order. The orders are also e-mailed, and there has never been a case where
an order was e-mailed and not inserted into the database, so it seems that
*something* is causing MySQL to insert records on its own even when no order
is being placed.
Any ideas on why and/or how to prevent this?
Logic Etc, Inc.