1 views_plugin_query_default.inc views_plugin_query_default::placeholder($base = 'views')

Generates a unique placeholder used in the db query.

File

core/modules/views/plugins/views_plugin_query_default.inc, line 1099
Defines the default query object.

Class

views_plugin_query_default
Object used to create a SELECT query.

Code

function placeholder($base = 'views') {
  static $placeholders = array();
  if (!isset($placeholders[$base])) {
    $placeholders[$base] = 0;
    return ':' . $base;
  }
  else {
    return ':' . $base . ++$placeholders[$base];
  }
}