db_escape_field

  1. drupal
    1. 8
    2. 7
Versions
7 – 8 db_escape_field($field)

Restricts a dynamic column or constraint name to safe characters.

Only keeps alphanumeric and underscores.

Parameters

$field The field name to escape.

Return value

The escaped field name as a string.

Related topics

Code

includes/database/database.inc, line 2550

<?php
function db_escape_field($field) {
  return Database::getConnection()->escapeField($field);
}
?>