Created
May 9, 2015 07:52
-
-
Save JohnnyTseng/c378fb3ce4efce3e17e6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[self inTransaction:^(FMDatabase *db, BOOL *rollback) { | |
for (NSDictionary *dictionary in array) { | |
count += 1; | |
[db executeUpdate:@"INSERT INTO actors (name,aid) VALUES (?,?)", [dictionary objectForKey:@"name"], [NSNumber numberWithInteger:[[dictionary objectForKey:@"id"] integerValue]]]; | |
} | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment