db_escape_table
includes/database.inc, line 383
- Versions
- 4.7 – 6
db_escape_table($string)- 7
db_escape_table($table)
Restrict a dynamic table, column or constraint name to safe characters.
Only keeps alphanumeric and underscores.
Related topics
Code
<?php
function db_escape_table($string) {
return preg_replace('/[^A-Za-z0-9_]+/', '', $string);
}
?> 