//dataBase=[FMDatabase databaseWithPath:[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,YES)[0] stringByAppendingPathComponent:@"b.db"]];
//if([dataBase open]){
//FMResultSet * rs =[dataBase executeQuery:@"select * from haha"];
//while ([rs next]) {
//NSLog(@"%@,%@",[rs stringForColumn:@"id"],[rs stringForColumn:@"name"]);
//}
//内容需要加引号 键值不用
//[dataBase executeUpdate:@"create table haha (id integer primary key autoincrement,name text)"];
//[dataBase executeUpdate:@"update haha set name='nidaye' where id=3"];
//[dataBase executeUpdate:@"delete from haha where id=2"];
//[dataBase executeUpdate:@"insert into haha (name) values ('zhaoliu')"];
网友评论