FMDB模糊查找

一、FMDB模糊查找方法

今天遇到了这个问题,查了一下资料,查到SQLite的模糊查找的方法,不过这也就是SQLite的模糊查找。

我使用了FMDB,所以就大概看了看语句,觉得差不多知道怎么写了,就写出了第一个版本:

@"select * from productPriceInfo where productCode like %%?%%";

不过一直提示错误,后面,脑子一转,换了个写法,就OK了:

@"select * from productPriceInfo where productCode like ?";
[db executeQuery:queryProductPriceInfo,[NSString stringWithFormat:@"%%%@%%",productCode]]

就是这样啦~

你可能感兴趣的:(FMDB模糊查找)