May 2005
Intermediate to advanced
352 pages
14h 39m
English
quote_identifier( )
$database_handle->quote_identifier($name) $database_handle->quote_identifier($catalog, $schema, $database_handle->quote_identifier($catalog, $schema, $table, \%attributes)
Use this to escape special characters of an identifier for use in an SQL statement. In the first syntax, the one parameter could be an identifier such as a table name. For the second syntax, the catalog name or link is given for the first parameter, a schema for the second, a table name for the third, and database attributes for the fourth. Here is an example of the first syntax:
my $sql_stmnt = "SHOW indexes FROM "
. $dbh->quote_identifier($table);Below is an example of the second syntax:
my $table_identifier = $dbh->quote_identifier('link', 'schema', 'table');The value of $table_identifier would be
"schema"."table"@"link".
Read now
Unlock full access