???????????????????????????????????
????1????????SQLite????????·????????FMDatabase????
??????1??FMDatabase *db = [FMDatabase databaseWithPath:path];
????if (![db open]) {
????NSLog(@"??????????");
????}
????2?????·??path?????????
??????1?????????·??
?????????????????????
??????2?????????@""
????????????????????????????
??????FMDatabase???????????????????????
??????3??nil
??????????????????????????FMDatabase???????????????????
??????????2?????FMDatabase??
????1????FMDB?У??????????????в??????????“????”
????create??drop??insert??update??delete??
????2????? executeStatements (?????????ж???SQL???)
????- (BOOL)executeStatements:(NSString *)sql
????- (BOOL)executeStatements:(NSString *)sql withResultBlock:
????3?????executeUpdate(?????????SQL????????????SQL???????)
????- (BOOL)executeUpdate:(NSString*)
????- (BOOL)executeUpdateWithFormat:(NSString*)format
????- (BOOL)executeUpdate:(NSString*)sql withArgumentsInArray:(NSArray *)arguments
???????
????[db executeUpdate:@"UPDATE t_student SET age = ? WHERE name = ?;"?? @20?? @"Jack"]
?????塢??в????FMDatabase??
????1?????????
????- (FMResultSet *)executeQuery:(NSString*)sql
????- (FMResultSet *)executeQueryWithFormat:(NSString*)format
????- (FMResultSet *)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray *)arguments
???????
????// ???????
????FMResultSet  * rs = [db executeQuery:@"SELECT * FROM t_student"];
????????????FMDatabaseQueue
????1?????Щ??????в????????????
??????1??- (void)inDatabase:(void (^)(FMDatabase *db))block
??????2??- (void)inTransaction:(void (^)(FMDatabase *db?? BOOL *rollback))block  ????д?????FMDatabase???????????????????????
????2????????????????
??????1???????????????
??????2??????????
????rollBack.memory = true
???????????FMResultSet?????
????1???Щ????Χ??“Column”???????????????н??в????????????????????????
objectForColumn:
intForColumn:
longForColumn:
longLongIntForColumn:
boolForColumn:
doubleForColumn:
stringForColumn:
dateForColumn:
dataForColumn:
dataNoCopyForColumn:
UTF8StringForColumnIndex:
????2??next???ж??????????????????
??????1???????????
????while ([rs next]) {
????NSString *name = [rs stringForColumn:@"name"];
????int age = [rs intForColumn:@"age"];
????double score = [rs doubleForColumn:@"score"];
????}