php man page for pg_escape_identifier

Query: pg_escape_identifier

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

PG_ESCAPE_IDENTIFIER(3) 												   PG_ESCAPE_IDENTIFIER(3)

pg_escape_identifier - Escape a identifier for insertion into a text field

SYNOPSIS
string pg_escape_identifier ([resource $connection], string $data)
DESCRIPTION
pg_escape_identifier(3) escapes a identifier (e.g. table, field names) for quering the database. It returns an escaped identifier string for PostgreSQL server. pg_escape_identifier(3) adds double quotes before and after data. Users should not add double quotes. Use of this function is recommended for identifier parameters in query. For SQL literals (i.e. parameters except bytea), pg_escape_literal(3) or pg_escape_string(3) muse be used. For bytea type fields, pg_escape_bytea(3) must be used instead. Note This function has internal escape code and can also be used with PostgreSQL 8.4 or less.
PARAMETERS
o $connection - PostgreSQL database connection resource. When $connection is not present, the default connection is used. The default connection is the last connection made by pg_connect(3) or pg_pconnect(3). o $data - A string containing text to be escaped.
RETURN VALUES
A string containing the escaped data.
EXAMPLES
Example #1 pg_escape_identifier(3) example <?php // Connect to the database $dbconn = pg_connect('dbname=foo'); // Escape the table name data $escaped = pg_escape_identifier($table_name); // Select rows from $table_name pg_query("SELECT * FROM {$escaped};"); ?>
SEE ALSO
pg_escape_literal(3), pg_escape_bytea(3), pg_escape_string(3). PHP Documentation Group PG_ESCAPE_IDENTIFIER(3)
Related Man Pages
addslashes(3) - php
pg_send_execute(3) - php
pg_pconnect(3) - php
pg_lo_import(3) - php
pg_query(3) - php
Similar Topics in the Unix Linux Community
How to count number of double quotes in bash
MySQL LIKE code not working in safari browser
Handling embedded double quotes within column data
Replace Double quotes within double quotes in a column with space while loading a CSV file
Replace double quotes inside the string data for all the columns