From 8b79c6ae1d19532932aace89d58bf9e0bc326029 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Thu, 9 Jul 2009 23:43:50 +0000 Subject: - Add support for the function "NOW()" to resolve Issue #300 --- Source/TableContent.m | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Source') diff --git a/Source/TableContent.m b/Source/TableContent.m index 11c09525..61499351 100644 --- a/Source/TableContent.m +++ b/Source/TableContent.m @@ -1540,6 +1540,9 @@ [rowValue setString:@"CURRENT_TIMESTAMP"]; } else if ([[NSArrayObjectAtIndex(theColumns, i) objectForKey:@"typegrouping"] isEqualToString:@"bit"]) { [rowValue setString:((![[rowObject description] length] || [[rowObject description] isEqualToString:@"0"])?@"0":@"1")]; + } else if ([[NSArrayObjectAtIndex(theColumns, i) objectForKey:@"typegrouping"] isEqualToString:@"date"] + && [[rowObject description] isEqualToString:@"NOW()"]) { + [rowValue setString:@"NOW()"]; } else { [rowValue setString:[NSString stringWithFormat:@"'%@'", [mySQLConnection prepareString:[rowObject description]]]]; } -- cgit v1.2.3