I am running with one LIKE statement problem.
The situation is that:
-
I’m saving phone number and name associated with that number from the contact book to app’s db.
-
Then I am displaying this name in the uitableview by firing this query …
NSString *sqlTemp =[NSString stringWithFormat:@"select name from phoneData where number like %'%@'%",number1];number1is(NSString *), the number I’m using is formatted like this(+international country code number). However number saved in db might be without country code and not prefixed with “+” symbol.
So my question is that even if number saved in the contacts book is not according to the international phone number, how can I ensure that it matches the other digits in the number?
Can any one suggest me some solution to this?
Here is what you can do: