Closed CCBrother closed 2 years ago
1、模型的字段时间戳是longlong类型,存到数据库却是integer类型,取出的顺序有问题,需要把时间戳转为字符串吗? 2、NSMutableArray *searchResultArray = [TWYIMChatMessageModel searchWithWhere:[NSString stringWithFormat:@"sessionId='%@'", self.sessionModel.sessionId] orderBy:@"sendTimeStamp asc" offset:0 count:20];
@"sendTimeStamp asc" 这里的asc是指数据库的数据升序呢?还是取出来20个数据后,再进行升序? 3、保存数据到数据库的时候可以按字段逆序保存吗?
明白了,感谢感谢!!!
1、模型的字段时间戳是longlong类型,存到数据库却是integer类型,取出的顺序有问题,需要把时间戳转为字符串吗? 2、NSMutableArray *searchResultArray = [TWYIMChatMessageModel searchWithWhere:[NSString stringWithFormat:@"sessionId='%@'", self.sessionModel.sessionId] orderBy:@"sendTimeStamp asc" offset:0 count:20];
@"sendTimeStamp asc" 这里的asc是指数据库的数据升序呢?还是取出来20个数据后,再进行升序? 3、保存数据到数据库的时候可以按字段逆序保存吗?