You are here

function views_plugin_query_default::get_table_info in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 7.3 plugins/views_plugin_query_default.inc \views_plugin_query_default::get_table_info()

Get the information associated with a table.

If you need the alias of a table with a particular relationship, use ensure_table().

File

plugins/views_plugin_query_default.inc, line 649
views_plugin_query_default.inc Defines the default query object which builds SQL to execute using the Drupal database API.

Class

views_plugin_query_default
Object used to create a SELECT query.

Code

function get_table_info($table) {
  if (!empty($this->table_queue[$table])) {
    return $this->table_queue[$table];
  }

  // In rare cases we might *only* have aliased versions of the table.
  if (!empty($this->tables[$this->base_table][$table])) {
    $alias = $this->tables[$this->base_table][$table]['alias'];
    if (!empty($this->table_queue[$alias])) {
      return $this->table_queue[$alias];
    }
  }
}