C# equivalent to php mysql_real_escape_string function

531 views
Skip to first unread message

undbund

unread,
Apr 27, 2009, 5:52:43 PM4/27/09
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Hi, I would like to know what is the C# equivalent to php
mysql_real_escape_string function. If there are no equivalent
funcitons, what functions in C# will help me attain the same results
as php mysql_real_escape_string function.

Thanks,
undbund

Cerebrus

unread,
Apr 28, 2009, 1:42:23 AM4/28/09
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Shouldn't you really be telling us what the "mysql_real_escape_string"
function does instead of having us search and find it out ?

You should use parameters when working in .NET. The parameter values
will be automatically escaped for invalid characters.
Reply all
Reply to author
Forward
0 new messages