diff options
Diffstat (limited to 'Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m')
-rw-r--r-- | Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m index 9b54029c..686be183 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection Categories/Querying & Preparation.m @@ -330,6 +330,11 @@ NSString *theErrorMessage = [self _stringForCString:mysql_error(mySQLConnection)]; NSUInteger theErrorID = mysql_errno(mySQLConnection); + // Update the connection's stored insert ID if available + if (mySQLConnection->insert_id) { + lastQueryInsertID = mySQLConnection->insert_id; + } + // If the query was cancelled, override the error state if (lastQueryWasCancelled) { theErrorMessage = NSLocalizedString(@"Query cancelled.", @"Query cancelled error"); |