aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableSource.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-05-26 09:31:54 +0000
committerBibiko <bibiko@eva.mpg.de>2009-05-26 09:31:54 +0000
commitbded839057f4f760b0c3cc2d3126aef15bc41cc9 (patch)
tree4992548a84ae001e08847ca6824174357137e2eb /Source/TableSource.m
parent5b7d38c091a7e539181709892e781316cd57a85d (diff)
downloadsequelpro-bded839057f4f760b0c3cc2d3126aef15bc41cc9.tar.gz
sequelpro-bded839057f4f760b0c3cc2d3126aef15bc41cc9.tar.bz2
sequelpro-bded839057f4f760b0c3cc2d3126aef15bc41cc9.zip
• add AFTER clause only if the user added a new field
- this should fix issue 280
Diffstat (limited to 'Source/TableSource.m')
-rw-r--r--Source/TableSource.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/TableSource.m b/Source/TableSource.m
index 3cc31deb..8a09b0ab 100644
--- a/Source/TableSource.m
+++ b/Source/TableSource.m
@@ -720,10 +720,10 @@ fetches the result as an array with a dictionary for each row in it
[queryString appendString:[NSString stringWithFormat:@", ADD %@ (%@)", [chooseKeyButton titleOfSelectedItem], [[theRow objectForKey:@"Field"] backtickQuotedString]]];
}
}
- } else {
+ } else if(isEditingNewRow){ // Add AFTER ... only if the user added a new field
[queryString appendString:[NSString stringWithFormat:@" AFTER %@", [[[tableFields objectAtIndex:(currentlyEditingRow -1)] objectForKey:@"Field"] backtickQuotedString]]];
}
-
+
[mySQLConnection queryString:queryString];
if ( [[mySQLConnection getLastErrorMessage] isEqualToString:@""] ) {