I've used PHP w/MySQL with great sucess in the past. Now I'm trying to convert some of my code to use SQL instead. I have a function...
function escape_data ($data) { // Create a function for escaping the data.
global $dbc; // Need the connection.
if (ini_get('magic_quotes_gpc')) {
$data = stripslashes($data);
}
return mysql_real_escape_string($data, $dbc);
}
Works very well for escaping data in MySQL. I'd like to use the same function in MS-SQL however I didn't see anything in the Doc's on php.net. Does a function like this exist for MSSQL?
Thanks in advance!
function escape_data ($data) { // Create a function for escaping the data.
global $dbc; // Need the connection.
if (ini_get('magic_quotes_gpc')) {
$data = stripslashes($data);
}
return mysql_real_escape_string($data, $dbc);
}
Works very well for escaping data in MySQL. I'd like to use the same function in MS-SQL however I didn't see anything in the Doc's on php.net. Does a function like this exist for MSSQL?
Thanks in advance!