ビューを設計しましたが、プレビューセクションに次のクエリが表示されます。
SELECT node.nid AS nid,
node_data_field_crm_history_brokerid.field_crm_history_brokerid_value AS node_data_field_crm_history_brokerid_field_crm_history_brokerid_value,
node.language AS node_language,
node.type AS node_type,
node.vid AS node_vid,
node_data_field_crm_history_brokerid.field_crm_history_caseid_value AS node_data_field_crm_history_brokerid_field_crm_history_caseid_value,
node_data_field_crm_history_brokerid.field_crm_history_dateadded_value AS node_data_field_crm_history_brokerid_field_crm_history_dateadded_value,
node_data_field_crm_history_brokerid.field_crm_history_entrydesc_value AS node_data_field_crm_history_brokerid_field_crm_history_entrydesc_value
FROM node node
LEFT JOIN content_type_crm_history node_data_field_crm_history_brokerid ON node.vid = node_data_field_crm_history_brokerid.vid
WHERE node.type in ('crm_history')
何がないvid
ここに意味ですか?
このクエリを使用してcrm_historyに行を挿入する単純なルールを挿入しようとすると、実際にこれが必要です。
$result = db_query("INSERT INTO {content_type_crm_history} (vid, nid, field_crm_history_caseid_value, field_crm_history_brokerid_value, field_crm_history_dateadded_value, field_crm_history_entrydesc_value) VALUES (" . $node->nid . ", " . $node->vid . ", " . $caseid . ", " . $brokerid . ", " . $dateadded . ", '" . t($entrydesc) . "')");
データベーステーブルに入力しますが、ビューには表示されません。コンテンツの作成ページで追加すると、ビューのみが表示されます。