db_escape_table

  1. drupal
    1. drupal6
    2. drupal7 database.inc
Versionen
drupal6 db_escape_table($string)
drupal7 db_escape_table($table)

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

Only keeps alphanumeric and underscores.

Verwandte Themen

▾ 11 functions call db_escape_table()

db_column_exists in includes/database.mysqli.inc
Check if a column exists in the given table.
db_column_exists in includes/database.mysql.inc
Check if a column exists in the given table.
db_column_exists in includes/database.pgsql.inc
Check if a column exists in the given table.
db_last_insert_id in includes/database.pgsql.inc
Returns the last insert id. This function is thread safe.
db_lock_table in includes/database.mysqli.inc
Lock a table.
db_lock_table in includes/database.pgsql.inc
Lock a table. This function automatically starts a transaction.
db_lock_table in includes/database.mysql.inc
Lock a table.
db_table_exists in includes/database.mysql.inc
Check if a table exists.
db_table_exists in includes/database.mysqli.inc
Check if a table exists.
db_table_exists in includes/database.pgsql.inc
Check if a table exists.
node_load in modules/node/node.module
Load a node object from the database.

Code

includes/database.inc, line 422

<?php
function db_escape_table($string) {
  return preg_replace('/[^A-Za-z0-9_]+/', '', $string);
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen