Flipkart Search

Cari Blog Ini

Khamis, 6 Ogos 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];

Tiada ulasan: