Commit ecbb6f3b553be62ca58357b6fd9506bc965ae618

Authored by yanglingyu
1 parent d18fb7bf

解决英文页不能收藏问题

CNLiveScioLive/Pages/Tools/DBAction/DBAction.m
@@ -167,7 +167,8 @@ static DBAction *instance = nil; @@ -167,7 +167,8 @@ static DBAction *instance = nil;
167 FMResultSet * re = [db executeQuery:check]; 167 FMResultSet * re = [db executeQuery:check];
168 if (![re next]) { 168 if (![re next]) {
169 NSString *desc = [notice.desc stringByReplacingOccurrencesOfString:@"'" withString:@"''"]; 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 BOOL res = [db executeUpdate:sql]; 172 BOOL res = [db executeUpdate:sql];
172 if (!res) { 173 if (!res) {
173 return NO; 174 return NO;
@@ -217,7 +218,8 @@ static DBAction *instance = nil; @@ -217,7 +218,8 @@ static DBAction *instance = nil;
217 notice.uuid = [rs stringForColumn:@"uuid"]; 218 notice.uuid = [rs stringForColumn:@"uuid"];
218 notice.publishDate = [rs stringForColumn:@"publishDate"]; 219 notice.publishDate = [rs stringForColumn:@"publishDate"];
219 notice.subTitle = [rs stringForColumn:@"subTitle"]; 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 notice.type = [rs stringForColumn:@"type"]; 223 notice.type = [rs stringForColumn:@"type"];
222 notice.uploadVideoUrl= [rs stringForColumn:@"uploadVideoUrl"]; 224 notice.uploadVideoUrl= [rs stringForColumn:@"uploadVideoUrl"];
223 notice.videoUrl = [rs stringForColumn:@"videoUrl"]; 225 notice.videoUrl = [rs stringForColumn:@"videoUrl"];