基本语句增删改查
一、更新
update xxxx SET xxxx = ‘xxxx’,xxxx = ? where xxxx = xxxx / ?;
二、删除
delete from xxxx where xxxx = xxxx / ? ;
三、插入
insert into xxxx (xxxx,xxx,….) values(xxxx,xxxx,?,?,?,?);
四、查找
select * from xxxx ;
FMDB执行语句
更新语句: [database executeUpdate:sqlStr values: array];
查询语句: [database executeQuery:sqlStr values: array];
结果集合: FMResultSet *s = [database executeQuery:sqlStr values: array];
while ([s next]){
NSString *str = [s stringForColumn:@”xxxx”];
Int i = [s intForColumnIndex:5];
}