我正在尝试使用views模块计算价格列表(十进制字段)的总和。它只是不想工作......我做错了什么或者......它只是一个错误?
sumPricesField在输出中保持空白,唯一给出值的聚合类型是COUNT
SQL错误:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in
your SQL syntax; check the manual that corresponds to your MySQL server version
for the right syntax to use near 'id) AS field_data_field_algembeo_entityid FROM
drupal_node node LEFT JOIN drupa' at line 1
生成的查询:
SELECT
node.title AS node_title,
node.nid AS nid,
node.created AS node_created,
MIN(node.nid) AS nid_1,
'node' AS field_data_field_bedrag_node_entity_type,
SUM(field_data_field_bedrag.field_bedrag_value) AS field_data_field_bedrag_field_bedrag_value,
SUM(field_data_field_bedrag.entity id) AS field_data_field_bedrag_entityid
FROM
{node} node
LEFT JOIN {field_data_field_bedrag} field_data_field_bedrag ON node.nid = field_data_field_bedrag.entity_id AND (field_data_field_bedrag.entity_type = node AND field_data_field_bedrag.deleted = 0)
WHERE
(( (node.status = '1') ))
GROUP BY
node_title, nid, node_created
ORDER BY
node_created DESC
LIMIT
10 OFFSET 0
答案 0 :(得分:0)
我在使用一些浮点字段时遇到了同样的问题。我发现这个补丁解决了我的问题http://drupal.org/node/1194900 在补丁之后,我的网站上也会出现上面提到的jQuery错误,但至少聚合有效。