Though some day I must learn PHP5, my hope for now is my client is not using PHP5 since I haven't dabbled in it yet.
I did find this function digging around under "addslashes" in the php manual:
function addslashes_mssql($str){
if (is_array($str)) {
foreach($str AS $id => $value) {
$str[$id] = addslashes_mssql($value);
}
} else {
$str = str_replace("'", "''", $str);
}
return $str;
}
function stripslashes_mssql($str){
if (is_array($str)) {
foreach($str AS $id => $value) {
$str[$id] = stripslashes_mssql($value);
}
} else {
$str = str_replace("''", "'", $str);
}
return $str;
}
I don't really know what characters are dangerous in MS SQL, but this seems to do something with single quotes anyway...