Commit ecbb6f3b553be62ca58357b6fd9506bc965ae618

Authored by yanglingyu
1 parent d18fb7bf

解决英文页不能收藏问题

CNLiveScioLive/Pages/Tools/DBAction/DBAction.m
... ... @@ -167,7 +167,8 @@ static DBAction *instance = nil;
167 167 FMResultSet * re = [db executeQuery:check];
168 168 if (![re next]) {
169 169 NSString *desc = [notice.desc stringByReplacingOccurrencesOfString:@"'" withString:@"''"];
170   - NSString * sql = [NSString stringWithFormat:@"INSERT INTO %@DATATABLE (cmsColumnName, cmsColumnId, cmsContentId, createDate, desc, gxbArticleId, gxbVideoId, img, pageUrl, picType, playType, publishDate, subTitle, title, type, uploadVideoUrl, videoUrl, vipFlag, uuid) values('%@','%@','%d', '%@','%@','%d','%d', '%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%d', '%@')",tableName.uppercaseString, notice.cmsColumnName, notice.cmsColumnId, notice.cmsContentId, notice.createDate, desc, notice.gxbArticleId, notice.gxbVideoId, notice.img, notice.pageUrl, notice.picType, notice.playType, notice.publishDate, notice.subTitle, notice.title, notice.type, notice.uploadVideoUrl, notice.videoUrl, notice.vipFlag, notice.uuid?notice.uuid:@""];
  170 + NSString *title = [notice.title stringByReplacingOccurrencesOfString:@"'" withString:@"‘"];
  171 + NSString * sql = [NSString stringWithFormat:@"INSERT INTO %@DATATABLE (cmsColumnName, cmsColumnId, cmsContentId, createDate, desc, gxbArticleId, gxbVideoId, img, pageUrl, picType, playType, publishDate, subTitle, title, type, uploadVideoUrl, videoUrl, vipFlag, uuid) values('%@','%@','%d', '%@','%@','%d','%d', '%@','%@','%@','%@','%@','%@','%@','%@','%@','%@','%d', '%@')",tableName.uppercaseString, notice.cmsColumnName, notice.cmsColumnId, notice.cmsContentId, notice.createDate, desc, notice.gxbArticleId, notice.gxbVideoId, notice.img, notice.pageUrl, notice.picType, notice.playType, notice.publishDate, notice.subTitle, title, notice.type, notice.uploadVideoUrl, notice.videoUrl, notice.vipFlag, notice.uuid?notice.uuid:@""];
171 172 BOOL res = [db executeUpdate:sql];
172 173 if (!res) {
173 174 return NO;
... ... @@ -217,7 +218,8 @@ static DBAction *instance = nil;
217 218 notice.uuid = [rs stringForColumn:@"uuid"];
218 219 notice.publishDate = [rs stringForColumn:@"publishDate"];
219 220 notice.subTitle = [rs stringForColumn:@"subTitle"];
220   - notice.title = [rs stringForColumn:@"title"];
  221 + NSString *title = [rs stringForColumn:@"title"];
  222 + notice.title = [title stringByReplacingOccurrencesOfString:@"‘" withString:@"'"];
221 223 notice.type = [rs stringForColumn:@"type"];
222 224 notice.uploadVideoUrl= [rs stringForColumn:@"uploadVideoUrl"];
223 225 notice.videoUrl = [rs stringForColumn:@"videoUrl"];
... ...