뷰를 디자인했으며 미리보기 섹션에이 쿼리가 표시됩니다.
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) . "')");
데이터베이스 테이블을 채우지 만 뷰에는 표시되지 않습니다. 컨텐츠 작성 페이지를 통해 추가 할 때보기 만 표시됩니다.