You are here

function views_plugin_query_default::add_signature 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::add_signature()

Add a signature to the query, if such a thing is feasible.

This signature is something that can be used when perusing query logs to discern where particular queries might be coming from.

Parameters

view $view: The view which is executed.

Overrides views_plugin_query::add_signature

File

plugins/views_plugin_query_default.inc, line 1285
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 add_signature(&$view) {
  $view->query
    ->add_field(NULL, "'" . $view->name . ':' . $view->current_display . "'", 'view_name');
}