ios中sqlite3查询以特定字符开头
在数据库number表格中的IDnumber项以5325开头的并且限制结果输出为5个请问怎么写提示incompleteformatspecifier警告也执行不成功NSS...
在数据库number表格中的IDnumber项以5325开头的
并且限制结果输出为5个
请问怎么写
提示incomplete format specifier警告
也执行不成功
NSString *sql =[[NSString alloc] initWithFormat: @"select * from number where IDnumber like'5325%'"]; sqlite3_stmt *stmt; if (sqlite3_prepare_v2(db, [sql UTF8String], -1, &stmt, Nil)==SQLITE_OK) { NSLog(@"limit search ok!"); while(sqlite3_step(stmt)==SQLITE_ROW) { char *data = (char *)sqlite3_column_text(stmt, 4); NSString *idMaybe =[[NSString alloc] initWithUTF8String:data]; NSLog(@"结果为%@",idMaybe); } 展开
并且限制结果输出为5个
请问怎么写
提示incomplete format specifier警告
也执行不成功
NSString *sql =[[NSString alloc] initWithFormat: @"select * from number where IDnumber like'5325%'"]; sqlite3_stmt *stmt; if (sqlite3_prepare_v2(db, [sql UTF8String], -1, &stmt, Nil)==SQLITE_OK) { NSLog(@"limit search ok!"); while(sqlite3_step(stmt)==SQLITE_ROW) { char *data = (char *)sqlite3_column_text(stmt, 4); NSString *idMaybe =[[NSString alloc] initWithUTF8String:data]; NSLog(@"结果为%@",idMaybe); } 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询