0
運行drupal 7.22,我需要添加一個選項來排序視圖 - 與Curses相關的內容類型講座。排序標準不正常
在「詛咒」頁面中,我需要按照特定順序顯示演講。
講義被dispayed以下面的方式
print views_embed_view('lecture_list_of_online_courses','block', $node->nid);
我嘗試以下簡單的解決方案 -
- 添加的字段「my_wight」與演講內容類型
- 從1增加值,以10根據必要的順序。
- 附加排序標準的lecture_list_of_online_courses視圖
結果:在那種似乎什麼都沒有做我加入「my_wight」
我一直使用的值顯示的視圖drupal之前很多次,並且不止一次地做過這樣的事情。
我可以得到這個錯誤。
這裏是從視圖生成的SQL查詢 -
SELECT node_field_data_field_oc_forum_reference.nid AS node_field_data_field_oc_forum_reference_nid, node_field_data_field_oc_forum_reference.title AS node_field_data_field_oc_forum_reference_title, node_field_data_field_oc_forum_reference.language AS node_field_data_field_oc_forum_reference_language, node_field_data_field_oc_forum_reference.type AS node_field_data_field_oc_forum_reference_type, node_field_data_field_oc_forum_reference.comment AS node_field_data_field_oc_forum_reference_comment, field_data_field_lecture_weight.field_lecture_weight_value AS field_data_field_lecture_weight_field_lecture_weight_value, 'node' AS field_data_body_node_entity_type
FROM
{node} node
LEFT JOIN {field_data_field_oc_forum_reference} field_data_field_oc_forum_reference ON node.nid = field_data_field_oc_forum_reference.entity_id AND (field_data_field_oc_forum_reference.entity_type = 'node' AND field_data_field_oc_forum_reference.deleted = '0')
INNER JOIN {node} node_field_data_field_oc_forum_reference ON field_data_field_oc_forum_reference.field_oc_forum_reference_nid = node_field_data_field_oc_forum_reference.nid
LEFT JOIN {field_data_field_lecture_weight} field_data_field_lecture_weight ON node.nid = field_data_field_lecture_weight.entity_id AND (field_data_field_lecture_weight.entity_type = 'node' AND field_data_field_lecture_weight.deleted = '0')
WHERE (((node.nid = '175'))AND(((node.status = '1') AND (node.type IN ('online_courses')))))
ORDER BY field_data_field_lecture_weight_field_lecture_weight_value DESC
我無法運行此查詢 - 任何想法,爲什麼?