escape % in iOS to write sql -
this question has reply here:
escape % in objective c 1 replyi want write sql query in nsstring, query is:
where fa_name '%anyvalue%' i wrote next code
nsstring *wherefamilyname = [nsstring stringwithformat:@"fa_name '\%%@\%'", typedfamilyname]; but doesn't escape % , output is:
fa_name '%@'
to escape % write 2 %%.
nsstring *string = [nsstring stringwithformat:@"fa_name '%%%@%%'", @"val"];
ios sql
No comments:
Post a Comment