Итоговая строка для View

Главные вкладки

Комментарии

Аватар пользователя Fanny@drupal.org Fanny@drupal.org 14 июня 2009 в 22:17

views_calc

«This module adds simple calculations to a views table. Requires the Views module.

You can SUM, AVERAGE, COUNT, MIN, MAX, or AVG selected columns. A plug in theme makes the view look more spreadsheet-like (right justifies numeric fields, shades calculated columns and rows, and underlines calculated rows).

You can also create custom dynamic fields that can be used in any view using SQL snippets like CONCAT('field_first_name', ' ', 'field_last_name') or DATE_FORMAT(node.created, '%m/%%d/%Y'). The custom fields are set up in admin/settings/views_calc.
Known Issues

* The complex queries created are not relationship-safe yet, so you can't do accurate calculations on fields coming from relationships.
* Custom fields can't do anything intelligent with multiple value CCK fields. For now stick to single value fields in custom fields.
»

Аватар пользователя Dan Dan 15 июня 2009 в 1:08

"<a href="mailto:Fanny@drupal.org">Fanny@drupal.org</a>" wrote:
Правда в вашем примере не очень понятно как считается второй столбец.

Он на единицу больше первого Smile

Аватар пользователя tbazadaykin tbazadaykin 15 июня 2009 в 10:55

народ, а ктонибудь знает как заставить эту штуку считать значения из Custom PHP fields? может в php field нужно добавить какойнить код дополнительный. чтоб эта штука считала по нему???

может есть еще модули, которые позволяют делать такую штуку в ручную? типа как тот же самый Custom PHP Fields