function drupal_schema_fields_sql

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 common.inc drupal_schema_fields_sql($table, $prefix = NULL)
cle7 common.inc drupal_schema_fields_sql($table, $prefix = NULL)
elmsmedia7 common.inc drupal_schema_fields_sql($table, $prefix = NULL)
icor7 common.inc drupal_schema_fields_sql($table, $prefix = NULL)
meedjum_blog7 common.inc drupal_schema_fields_sql($table, $prefix = NULL)
mooc7 common.inc drupal_schema_fields_sql($table, $prefix = NULL)

Retrieves a list of fields from a table schema.

The returned list is suitable for use in an SQL query.

Parameters

$table: The name of the table from which to retrieve fields.

An optional prefix to to all fields.:

Return value

An array of fields.

Related topics

5 calls to drupal_schema_fields_sql()
admin_menu_tree_dynamic in sites/all/modules/ulmus/admin_menu/admin_menu.inc
Load menu link trees for router paths containing dynamic arguments.
entity_get_info in includes/common.inc
Get the entity info array of an entity type.
system_admin_menu_block in modules/system/system.module
Provide a single block on the administration overview page.
system_get_module_admin_tasks in modules/system/system.module
Generate a list of tasks offered by a specified module.
_fe_block_settings_update_global_settings in sites/all/modules/ulmus/features_extra/fe_block.module
Helper to update global block settings for a specific block.

File

includes/common.inc, line 7055
Common functions that many Drupal modules will need to reference.

Code

function drupal_schema_fields_sql($table, $prefix = NULL) {
  $schema = drupal_get_schema($table);
  $fields = array_keys($schema['fields']);
  if ($prefix) {
    $columns = array();
    foreach ($fields as $field) {
      $columns[] = "$prefix.$field";
    }
    return $columns;
  }
  else {
    return $fields;
  }
}