| Versionen | |
|---|---|
| drupal6 | db_escape_table( |
| drupal7 | db_escape_table($table) |
Restrict a dynamic table, column or constraint name to safe characters.
Only keeps alphanumeric and underscores.
includes/
<?php
function db_escape_table($string) {
return preg_replace('/[^A-Za-z0-9_]+/', '', $string);
}
?>
Kommentare
Kommentar hinzufügen