db_escape_string

includes/database.pgsql.inc, line 363

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

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.