lun119 2013-06-17 01:07 采纳率: 0%
浏览 1772

删除通话记录中的某一条数据

I want to remove callhistory article call one of the data in the database, the database is read-only, how should do?
Code:
//获取数据库 FMDatabase * db = [dataManager openDataBase]; //判断数据库是否能打开 if ([db open]) { //获取通话记录中所有的address FMResultSet * rs = [db executeQuery:@"SELECT address FROM privacy_call"]; NSString * markaddress = nil; while ([rs next]) { NSString * address = [rs stringForColumn:@"address"]; if ([self isEqualContactNumber:address withPrivacyNumber:number] && ![markaddress isEqualToString:address]) { markaddress = address; //删除数据 BOOL resultSet = [db executeUpdate:@"DELETE FROM privacy_call WHERE address = ?",address]; success = resultSet; } } [rs close]; } else { NSLog(@"数据库打开错误"); return NO; }

  • 写回答

1条回答

  • number1killer 2017-08-29 04:20
    关注

    Why did you use"删除" in chinese but use remove in English but not delete?

    评论

报告相同问题?

悬赏问题

  • ¥50 树莓派安卓APK系统签名
  • ¥15 maple软件,用solve求反函数出现rootof,怎么办?
  • ¥65 汇编语言除法溢出问题
  • ¥15 Visual Studio问题
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波
  • ¥15 针对曲面部件的制孔路径规划,大家有什么思路吗