Alright.. I found a piece of code in the code library which evidently repairs the problem I am experiencing through a function. I am not super familiar with functions, and certainly not ones which appear (to me) to be as complex as the code I posted below. Looking thru it, I am not sure if this line is correct?
$params = split(",", $strQuery);
And how would I implement this into my script? What would I need to change in the function? Where would I place it?
function checkApostrophes(&$strQuery) {
//Remove white space
$strQuery = trim($strQuery);
$params = split(",", $strQuery);
$buffer = "";
foreach($params as $param) {
$param = trim($param);
if (substr_count($param, "'") > 0) {
//replace double all quotes in data
$param = substr($param, 0, strpos($param, "'"))."'".str_replace("'", "''", substr( $param, strpos($param, "'") + 1, -1 ))."'";
}
$buffer .= $param.", ";
}
//remove final "," and "\"s
$strQuery = str_replace("\\", "", substr($buffer, 0, -2));
}