Пример JOIN-а таблицы в своем views field handler:
/**
* Called to add the field to a query.
*/
public function query() {
$this->ensure_my_table();
$join = new views_join();
$join->definition = array(
'table' => 'variable_store',
'field' => 'name',
'left_table' => $this->table_alias,
'left_field' => 'name',
'type' => 'INNER',
);
$join->construct();
$join->adjusted = TRUE;
// Присоединяем таблицу 'variable_store' по колонке 'name'.
$this->table_alias = $this->query->add_table('variable_store', NULL, $join);
// Добавляем к запросу колонку 'realm_key' из присоединенной таблицы 'variable_store'.
$this->field_alias = $this->query->add_field($this->table_alias, 'realm_key');
}