drupal_schema_field_types
function drupal_schema_field_types
drupal_schema_field_types($table)
Retrieves the type for every field in a table schema.
Parameters
$table: The name of the table from which to retrieve type information.
Return value
An array of types, keyed by field name.
Related topics
File
- includes/common.inc, line 7201
- Common functions that many Drupal modules will need to reference.
Code
function drupal_schema_field_types($table) { $table_schema = drupal_get_schema($table); $field_types = array(); foreach ($table_schema['fields'] as $field_name => $field_info) { $field_types[$field_name] = isset($field_info['type']) ? $field_info['type'] : NULL; } return $field_types; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!common.inc/function/drupal_schema_field_types/7.x