BOOL result = [self.photoDataBase executeUpdate:@"CREATE TABLE IF NOT EXISTS photoData (photo BLOB NOT NULL);"];//BLOB:二进制大对象,用于存储二进制数据,在SQLite中,是不区分大小写的
if (result) {
NSLog(@"创表成功");
} else {
NSLog(@"创表失败");
}
}
}
//FMDB查询数据
- (void)queryData {
if ([self.photoDataBase open]) {
// 1.执行查询语句
FMResultSet *photoResultSet = [self.photoDataBase executeQuery:@"SELECT * FROM photoData"];