function drupal_schema_field_types
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
1 call to drupal_schema_field_types()
- entity_get_info in includes/
common.inc - Get the entity info array of an entity type.
File
-
includes/
common.inc, line 7385
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.