function views_query::get_join_data

2.x query.inc views_query::get_join_data($table, $base_table)

Retrieve join data from the larger join data cache.

Parameters

$table: The table to get the join information for.

$base_table: The path we're following to get this join.

Return value

A views_join object or child object, if one exists.

3 calls to views_query::get_join_data()
views_query::ensure_path in includes/query.inc
Make sure that the specified table can be properly linked to the primary table in the JOINs. This function uses recursion. If the tables needed to complete the path back to the primary table are not in the query they will be added, but additional…
views_query::ensure_table in includes/query.inc
Ensure a table exists in the queue; if it already exists it won't do anything, but if it doesn't it will add the table queue. It will ensure a path leads back to the relationship table.
views_query::queue_table in includes/query.inc
Add a table to the query without ensuring the path.

File

includes/query.inc, line 578
query.inc Defines the query object which is the underlying layer in a View.

Class

views_query
Object used to create a SELECT query.

Code

function get_join_data($table, $base_table) {
  // Check to see if we're linking to a known alias. If so, get the real
  // table's data instead.
  if (!empty($this->table_queue[$table])) {
    $table = $this->table_queue[$table]['table'];
  }
  return views_get_table_join($table, $base_table);

}