You are here

function DB_mysql::escapeSimple in Flickr API 5

Escapes a string according to the current DBMS's standards

@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

DB_common::quoteSmart()

File

phpFlickr/PEAR/DB/mysql.php, line 794

Class

DB_mysql
The methods PEAR DB uses to interact with PHP's mysql extension for interacting with MySQL databases

Code

function escapeSimple($str) {
  if (function_exists('mysql_real_escape_string')) {
    return @mysql_real_escape_string($str, $this->connection);
  }
  else {
    return @mysql_escape_string($str);
  }
}