e sm - 2008-06-07 23:28:58
if I have the following:
$values["Name"] = MySQL::SQLValue("Violet's time");
the value of name in a sql statement has the following value:
Violet''s time [***the single quote is now two single quotes***]
for a string, the SQLValue function has the following:
case "text":
case "string":
case "varchar":
case "char":
if (strlen($value) == 0) {
$return_value = "NULL";
} else {
$return_value = "'" . str_replace("'", "''", $value) . "'";
}
break;
it replaces one single quote with two single quotes.
that seems wrong. what am i missing...???
.