美文网首页
FMDatabase

FMDatabase

作者: j了个p | 来源:发表于2015-11-26 15:31 被阅读0次

    //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')"];

    相关文章

      网友评论

          本文标题:FMDatabase

          本文链接:https://www.haomeiwen.com/subject/zjrdhttx.html