db_escape_string

includes/database.pgsql.inc, line 334

Versions
4.6 – 6
db_escape_string($text)

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

Related topics

▾ 5 functions call db_escape_string()

node_load in modules/node.module
Load a node object from the database.
system_update_151 in database/updates.inc
tablesort_sql in includes/tablesort.inc
Create an SQL sort clause.
update_convert_table_utf8 in ./update.php
Convert a single MySQL table to UTF-8.
_db_query_callback in includes/database.inc
Helper function for db_query().

Code

<?php
function db_escape_string($text) {
  return pg_escape_string($text);
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.