summaryrefslogtreecommitdiffstats
path: root/Classes/Topic.m
diff options
context:
space:
mode:
authormatt handler <matt.handler@gmail.com>2011-04-25 00:27:48 -0400
committermatt handler <matt.handler@gmail.com>2011-04-25 00:27:48 -0400
commit0c7a7586d3c2ab22adb15f032b0a69c962aaeeaf (patch)
tree3b739d5b322479355a126213b0e52c2b0b11b3ad /Classes/Topic.m
parent88d3de337a09fcab2439b20f5cb5d76aa0fcf08a (diff)
downloadpiccast-app-0c7a7586d3c2ab22adb15f032b0a69c962aaeeaf.tar.gz
piccast-app-0c7a7586d3c2ab22adb15f032b0a69c962aaeeaf.zip
we all good son, well, at least its writing to the db
Diffstat (limited to 'Classes/Topic.m')
-rw-r--r--Classes/Topic.m6
1 files changed, 4 insertions, 2 deletions
diff --git a/Classes/Topic.m b/Classes/Topic.m
index 65ea506..123df3f 100644
--- a/Classes/Topic.m
+++ b/Classes/Topic.m
@@ -52,18 +52,20 @@
}
- (void)serializeToDatabase:(FMDatabase *)db {
- //NSLog(@"title: %@", title);
+ [db retain];
+ NSLog(@"title: %@", title);
[db executeUpdate:@"INSERT INTO picCasts \
(foreignId, link, title, description, releaseDate, category, iconUrl, picCount) \
VALUES \
(?, ?, ?, ?, ?, ?, ?, ?)",
- 12, guid, title, description, [Topic dateToString:releaseDate], category, picCount];
+ [NSNumber numberWithInt:12], guid, title, description, [Topic dateToString:releaseDate], category, iconUrl, [NSNumber numberWithInt:12]];
//NSLog(@"insert id:%d error: %@", [db lastInsertRowId], [db lastErrorMessage]);
// [NSString stringWithFormat:@"number %d", i],
// [NSNumber numberWithInt:i],
// [NSDate date],
// [NSNumber numberWithFloat:2.2f]];
+ [db release];
}
- (void)dealloc {