function DB_pgsql::escapeSimple in Flickr API 5
Escapes a string according to the current DBMS's standards
{@internal PostgreSQL treats a backslash as an escape character, so they are escaped as well.
Not using pg_escape_string() yet because it requires PostgreSQL to be at version 7.2 or greater.}}
@since Method available since Release 1.6.0
Parameters
string $str the string to be escaped:
Return value
string the escaped string
Overrides DB_common::escapeSimple
See also
1 call to DB_pgsql::escapeSimple()
- DB_pgsql::quoteSmart in phpFlickr/
PEAR/ DB/ pgsql.php - Formats input so it can be safely used in a query
File
- phpFlickr/
PEAR/ DB/ pgsql.php, line 524
Class
- DB_pgsql
- The methods PEAR DB uses to interact with PHP's pgsql extension for interacting with PostgreSQL databases
Code
function escapeSimple($str) {
return str_replace("'", "''", str_replace('\\', '\\\\', $str));
}