当我试图执行选择查询不执行。

在下面的代码行的执行程序停止后。

NSString *query = [NSString stringWithFormat:@"select * from maintable_master where din =? ",din];

最佳答案

如果din是整数,

NSString *query = [NSString stringWithFormat:@"select * from maintable_master where din =%d ",din];


如果din是字符串,

NSString *query = [NSString stringWithFormat:@"select * from maintable_master where din ='%@' ",din];

关于iphone - 选择查询未执行,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/10697029/

10-09 06:31