iOS 中使用FMDB 查询最大值 一直提示I could not find the column named 'id'

[复制链接]
查看11 | 回复2 | 2021-1-27 06:25:36 | 显示全部楼层 |阅读模式
这里是我的封装的方法
+(NSInteger)selectMaxSyncKey_FamilyMembers
{
FMResultSet*set=[_dbexecuteQuery:@"SELECTMAX(id)FROMt_familyMembers"];
NSIntegernum=0;
while(set.next){
num=[setintForColumn:@"id"];
returnnum;
}
分 -->
回复

使用道具 举报

千问 | 2021-1-27 06:25:36 | 显示全部楼层
用这个方法:[_dblongForQuery:@"SELECTMAX(startTime)FROMt_route"]
回复

使用道具 举报

千问 | 2021-1-27 06:25:36 | 显示全部楼层
太简单的问题了,你查出来的字段没有命名啊.
max(id)asid
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行