Welcome Guest, Not a member yet? Register   Sign In
Problem in single quote
#3

[eluser]Tamilmani[/eluser]
I have tried those things

For Example:

$name = "Mc'Donald";
$slashName = addslashes($t); // output- 'Mc\'Donald'
insert into user(user_name)values('$slashName');

when i tried to run the above query.

Getting below error message.

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'Donald'.
Msg 105, Level 15, State 1, Line 1
Unclosed quotation mark after the character string ')
'.


Messages In This Thread
Problem in single quote - by El Forum - 02-04-2011, 04:28 AM
Problem in single quote - by El Forum - 02-04-2011, 05:07 AM
Problem in single quote - by El Forum - 02-04-2011, 05:13 AM
Problem in single quote - by El Forum - 02-04-2011, 05:14 AM
Problem in single quote - by El Forum - 02-04-2011, 05:26 AM
Problem in single quote - by El Forum - 02-04-2011, 05:33 AM
Problem in single quote - by El Forum - 02-04-2011, 05:48 AM
Problem in single quote - by El Forum - 02-04-2011, 05:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB