function views_plugin_query_default::mark_table in Views (for Drupal 7) 6.3
Same name and namespace in other branches
- 7.3 plugins/views_plugin_query_default.inc \views_plugin_query_default::mark_table()
1 call to views_plugin_query_default::mark_table()
- views_plugin_query_default::queue_table in plugins/
views_plugin_query_default.inc - Add a table to the query without ensuring the path.
File
- plugins/
views_plugin_query_default.inc, line 407 - 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 mark_table($table, $relationship, $alias) {
// Mark that this table has been added.
if (empty($this->tables[$relationship][$table])) {
if (!isset($alias)) {
$alias = '';
if ($relationship != $this->base_table) {
// double underscore will help prevent accidental name
// space collisions.
$alias = $relationship . '__';
}
$alias .= $table;
}
$this->tables[$relationship][$table] = array(
'count' => 1,
'alias' => $alias,
);
}
else {
$this->tables[$relationship][$table]['count']++;
}
return $alias;
}