You are here

public function views_handler_argument_string::get_formula in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 handlers/views_handler_argument_string.inc \views_handler_argument_string::get_formula()
  2. 6.2 handlers/views_handler_argument_string.inc \views_handler_argument_string::get_formula()

Get the formula for this argument.

$this->ensure_my_table() MUST have been called prior to this.

2 calls to views_handler_argument_string::get_formula()
views_handler_argument_string::query in handlers/views_handler_argument_string.inc
Build the query based upon the formula
views_handler_argument_string::summary_query in handlers/views_handler_argument_string.inc
Build the summary query based on a string.

File

handlers/views_handler_argument_string.inc, line 177
Definition of views_handler_argument_string.

Class

views_handler_argument_string
Argument handler to implement string arguments that may have length limits.

Code

public function get_formula() {
  return "SUBSTRING({$this->table_alias}.{$this->real_field}, 1, " . intval($this->options['limit']) . ")";
}