To Use Like Statement In Objective-c
First Take A Temporary String like this
NSString *temp = [NSString stringWithFormat:@"%%%@%%", yourString];
now here is an example on how to use this
NSMutableString *query = [[NSMutableString alloc] initWithFormat:@"select flashCardId,flashCardText from Table where flashcardtext like '%@' and categoryId=%d",temp,categoryid];
No comments:
Post a Comment