db_escape_table

Definition

db_escape_table($table)
drupal/includes/database/database.inc, line 1736

Description

Restrict a dynamic table, column or constraint name to safe characters.

Only keeps alphanumeric and underscores.

Parameters

$table The table name to escape.

Return value

The escaped table name as a string.

Related topics

Namesort iconDescription
Database abstraction layerAllow the use of different database servers using the same code base.

Code

function db_escape_table($table) {
  return Database::getActiveConnection()->escapeTable($table);
}