You are here

function DB_common::escapeSimple in Flickr API 5

Escapes a string according to the current DBMS's standards

In SQLite, this makes things safe for inserts/updates, but may cause problems when performing text comparisons against columns containing binary data. See the {@link http://php.net/sqlite_escape_string PHP manual} for more info.

@since Method available since Release 1.6.0

Parameters

string $str the string to be escaped:

Return value

string the escaped string

See also

DB_common::quoteSmart()

1 call to DB_common::escapeSimple()
DB_common::quoteSmart in phpFlickr/PEAR/DB/common.php
Formats input so it can be safely used in a query
2 methods override DB_common::escapeSimple()
DB_mysql::escapeSimple in phpFlickr/PEAR/DB/mysql.php
Escapes a string according to the current DBMS's standards
DB_pgsql::escapeSimple in phpFlickr/PEAR/DB/pgsql.php
Escapes a string according to the current DBMS's standards

File

phpFlickr/PEAR/DB/common.php, line 455

Class

DB_common
DB_common is the base class from which each database driver class extends

Code

function escapeSimple($str) {
  return str_replace("'", "''", $str);
}