1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59:13 +00:00

magic-removal: Merged to [2645]

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2646 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-04-10 02:13:37 +00:00
parent 74be995014
commit 985da9307b

View File

@ -115,8 +115,7 @@ dictfetchmany = util.dictfetchmany
dictfetchall = util.dictfetchall dictfetchall = util.dictfetchall
def get_last_insert_id(cursor, table_name, pk_name): def get_last_insert_id(cursor, table_name, pk_name):
cursor.execute("SELECT LAST_INSERT_ID()") return cursor.lastrowid
return cursor.fetchone()[0]
def get_date_extract_sql(lookup_type, table_name): def get_date_extract_sql(lookup_type, table_name):
# lookup_type is 'year', 'month', 'day' # lookup_type is 'year', 'month', 'day'