You are here

function views_query_handler_field_last_comment_name in Views (for Drupal 7) 5

1 string reference to 'views_query_handler_field_last_comment_name'
comment_views_tables in modules/views_comment.inc
This include file implements views functionality on behalf of comment.module

File

modules/views_comment.inc, line 207

Code

function views_query_handler_field_last_comment_name($field, $fieldinfo, &$query) {
  $num = $query
    ->add_table('users', false, 1, array(
    'left' => array(
      'table' => $field['tablename'],
      'field' => 'last_comment_uid',
    ),
    'right' => array(
      'field' => 'uid',
    ),
  ));
  $query
    ->add_field('name', $query
    ->get_table_name('users', $num), $field['tablename'] . '_name');
}