You are here

function _views_calc_fields in Views Calc 7

Same name and namespace in other branches
  1. 5 views_calc.module \_views_calc_fields()
  2. 6.3 views_calc.module \_views_calc_fields()
  3. 6 views_calc.module \_views_calc_fields()

Views calc fields result object.

5 calls to _views_calc_fields()
views_calc_export_form in ./views_calc.module
FAPI export_form.
views_calc_fields_form in ./views_calc.module
FAPI fields_form.
views_calc_field_handler::query in ./views_calc_field_handler.inc
Find the right calculation and add it to the query as an aliased field.
views_calc_handler_sort::query in ./views_calc_handler_sort.inc
Called to add the sort to a query.
views_calc_views_data in ./views_calc.views.inc
Implements hook_views_data().

File

./views_calc.module, line 463
This module will allow you to add calculated fields to views tables and compute (SUM, COUNT, AVG, etc) columns of numeric data in a views table.

Code

function _views_calc_fields() {
  $query = db_select('views_calc_fields', 'vcf');
  $query
    ->fields('vcf', array(
    'cid',
    'label',
    'calc',
    'tablelist',
    'fieldlist',
    'format',
    'custom',
    'base',
  ));
  $result = $query
    ->execute();
  return $result;
}