I am inserting value which contains & character, but the value breaks after & while it's inserted in database. Can anyone please help me to insert value with & character?
My filed's datatype is varchar(50)
and collation is utf8_general_ci
.
I have used code:
NSString *strUr=[NSString stringWithFormat:@"%s%s?event_name=%@&id=%@",ServerPath,URLAddEvent,eventName,ID];
strUr = [strUr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSLog(@"url : %@",strUr);
request=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:strUr]];
con=[[NSURLConnection alloc]initWithRequest:request delegate:self];
if(con)
{
webdata=[NSMutableData data];
}
in my ios code.
Any needful help will be appreciated.