diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-05-26 09:31:54 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-05-26 09:31:54 +0000 |
commit | bded839057f4f760b0c3cc2d3126aef15bc41cc9 (patch) | |
tree | 4992548a84ae001e08847ca6824174357137e2eb | |
parent | 5b7d38c091a7e539181709892e781316cd57a85d (diff) | |
download | sequelpro-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
-rw-r--r-- | Source/TableSource.m | 4 |
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:@""] ) { |