function DB_common::quote in Flickr API 5
DEPRECATED: Quotes a string so it can be safely used in a query
Parameters
string $string the string to quote:
Return value
string the quoted string or the string <samp>NULL</samp> if the value submitted is <kbd>null</kbd>.
Deprecated
Deprecated in release 1.6.0
See also
DB_common::quoteSmart(), DB_common::escapeSimple()
1 call to DB_common::quote()
- DB_common::quoteString in phpFlickr/
PEAR/ DB/ common.php - DEPRECATED: Quotes a string so it can be safely used within string delimiters in a query
2 methods override DB_common::quote()
- DB_mysql::quote in phpFlickr/
PEAR/ DB/ mysql.php - DB_pgsql::quote in phpFlickr/
PEAR/ DB/ pgsql.php - @internal
File
- phpFlickr/
PEAR/ DB/ common.php, line 269
Class
- DB_common
- DB_common is the base class from which each database driver class extends
Code
function quote($string = null) {
return $string === null ? 'NULL' : "'" . str_replace("'", "''", $string) . "'";
}