这个查询的正确语法是什么?

时间:2011-11-09 18:44:57

标签: objective-c sqlite

NSString *querySQL = [NSString stringWithFormat: @"SELECT address, phone FROM contacts WHERE name LIKE @0","%name.text%"];

1 个答案:

答案 0 :(得分:0)

这个怎么样?

NSString *querySQL = [NSString stringWithFormat:@"SELECT address,phone FROM Contacts WHERE name LIKE '%@%%'", name.text];