Escapes and surrounds a PHP value with single quotes.
string $value A PHP value:
string The quoted, escaped string
public static function escapeWithSingleQuotes($value) { return sprintf("'%s'", str_replace('\'', '\'\'', $value)); }