diff options
author | stuconnolly <stuart02@gmail.com> | 2009-01-29 18:02:43 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2009-01-29 18:02:43 +0000 |
commit | b1809a297076acdf1d5f56f7b81b6c1bbfaf7538 (patch) | |
tree | 3c07953cf4c27e683cad9219ec231875e508d16e | |
parent | cd003769b9cdd036266e01683c09ede3430ff385 (diff) | |
download | sequelpro-b1809a297076acdf1d5f56f7b81b6c1bbfaf7538.tar.gz sequelpro-b1809a297076acdf1d5f56f7b81b6c1bbfaf7538.tar.bz2 sequelpro-b1809a297076acdf1d5f56f7b81b6c1bbfaf7538.zip |
Query failing because of field length applied to datetime field. Fixes #135.
-rw-r--r-- | Source/TableSource.m | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/TableSource.m b/Source/TableSource.m index 51ef01cc..b9b1a3c1 100644 --- a/Source/TableSource.m +++ b/Source/TableSource.m @@ -580,7 +580,7 @@ returns YES if no row is beeing edited and nothing has to be written to db } } else { //CHANGE syntax - if ( [[theRow objectForKey:@"Length"] isEqualToString:@""] || ![theRow objectForKey:@"Length"] ) { + if (([[theRow objectForKey:@"Length"] isEqualToString:@""]) || (![theRow objectForKey:@"Length"]) || ([[theRow objectForKey:@"Type"] isEqualToString:@"datetime"])) { queryString = [NSMutableString stringWithFormat:@"ALTER TABLE `%@` CHANGE `%@` `%@` %@", selectedTable, [oldRow objectForKey:@"Field"], [theRow objectForKey:@"Field"], [theRow objectForKey:@"Type"]]; |