Flipkart Search

Search This Blog

Thursday, August 6, 2009

How To Use Like Statement In Objective-c

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: