#44 c.lastrowid in MySQLConnection

closed-accepted
nobody
MySQL (29)
5
2005-02-21
2004-10-04
John A. Barbuto
No

In the _queryInsertID() method of MySQLConnection for
0.6, the line:

id = c.insert_id()

was switched to the following:

id = c.lastrowid

While this is necessary for the newer versions of
MySQLdb, it breaks older versions. I attached a patch
which allows both older and newer versions of MySQLdb
to work.

Discussion

  • SO patch

     
    Attachments
  • Ian Bicking
    Ian Bicking
    2005-02-21

    • status: open --> closed-accepted