lundi 9 mai 2016

IN clause in objective c

Hi i am using "IN" clause in objective c but this is not able to get data.

SELECT * FROM database WHERE colum1!=0 AND colum2!=0 AND colum3 IN ('Allah','is');

for this query code is i am using

NSArray* serch = [NSArray arrayWithObjects:@"Allah",@"is",nil];
    str1=[NSString stringWithFormat:@"SELECT * FROM database WHERE colum1!=0 AND colum2!=0 AND colum3 IN ('%@')",[serch componentsJoinedByString:@"','"]]

FMResultSet return nil;

Aucun commentaire:

Enregistrer un commentaire