|
|
@@ -2604,11 +2604,11 @@
|
|
|
|
|
|
while (sqlite3_step(statement) == SQLITE_ROW) {
|
|
|
char *name = (char *) sqlite3_column_text(statement, 1); // 全称
|
|
|
- char *code = (char *) sqlite3_column_text(statement, 2); // 缩写
|
|
|
+// char *code = (char *) sqlite3_column_text(statement, 2); // 缩写
|
|
|
int code_id = sqlite3_column_int(statement, 3); // id
|
|
|
|
|
|
NSMutableDictionary *countryDic = [NSMutableDictionary dictionaryWithCapacity:2];
|
|
|
- [countryDic setValue:[NSString stringWithFormat:@"%s %s",code,name] forKey:@"value"];
|
|
|
+ [countryDic setValue:[NSString stringWithFormat:@"%s",name] forKey:@"value"];
|
|
|
[countryDic setValue:[NSString stringWithFormat:@"%d",code_id] forKey:@"value_id"];
|
|
|
[countryDic setValue:[NSNumber numberWithInt:0] forKey:@"check"];
|
|
|
|
|
|
@@ -2630,9 +2630,10 @@
|
|
|
|
|
|
sqlite3 *db = [iSalesDB get_db];
|
|
|
|
|
|
- NSString *sqlQuery = [NSString stringWithFormat:@"select * from offline_state where country_code = %@;",countryCode];
|
|
|
+ NSString *sqlQuery = [NSString stringWithFormat:@"select * from offline_state where country_code = '%@';",countryCode];
|
|
|
|
|
|
// NSString *sqlQuery = [NSString stringWithFormat:@"select * from offline_state"];
|
|
|
+ DebugLog(@"query state:%@",sqlQuery);
|
|
|
|
|
|
sqlite3_stmt * statement;
|
|
|
|