You are here

function db_escape_string in Drupal 6

Same name in this branch
  1. 6 includes/database.mysqli.inc \db_escape_string()
  2. 6 includes/database.mysql.inc \db_escape_string()
  3. 6 includes/database.pgsql.inc \db_escape_string()
Same name and namespace in other branches
  1. 4 includes/database.mysqli.inc \db_escape_string()
  2. 4 includes/database.mysql.inc \db_escape_string()
  3. 4 includes/database.pgsql.inc \db_escape_string()
  4. 5 includes/database.mysqli.inc \db_escape_string()
  5. 5 includes/database.mysql.inc \db_escape_string()
  6. 5 includes/database.pgsql.inc \db_escape_string()

Prepare user input for use in a database query, preventing SQL injection attacks. Note: This function requires PostgreSQL 7.2 or later.

Related topics

1 call to db_escape_string()
_db_query_callback in includes/database.inc
Helper function for db_query().

File

includes/database.pgsql.inc, line 363
Database interface code for PostgreSQL database servers.

Code

function db_escape_string($text) {
  return pg_escape_string($text);
}