From 985da9307b3a7eecc396302a894c87342a975958 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Mon, 10 Apr 2006 02:13:37 +0000 Subject: [PATCH] magic-removal: Merged to [2645] git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2646 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/backends/mysql/base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py index c33c60db31..ac2e7c7b3e 100644 --- a/django/db/backends/mysql/base.py +++ b/django/db/backends/mysql/base.py @@ -115,8 +115,7 @@ dictfetchmany = util.dictfetchmany dictfetchall = util.dictfetchall def get_last_insert_id(cursor, table_name, pk_name): - cursor.execute("SELECT LAST_INSERT_ID()") - return cursor.fetchone()[0] + return cursor.lastrowid def get_date_extract_sql(lookup_type, table_name): # lookup_type is 'year', 'month', 'day'