db_escape_table
Definition
db_escape_table($string)
includes/database.inc, line 383
Description
Restrict a dynamic table, column or constraint name to safe characters.
Only keeps alphanumeric and underscores.
Related topics
| Name | Description |
|---|---|
| Database abstraction layer | Allow the use of different database servers using the same code base. |
Code
<?php
function db_escape_table($string) {
return preg_replace('/[^A-Za-z0-9_]+/', '', $string);
}
?> 