Ho progettato una vista e vedo questa query nella sezione di anteprima:
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')
Cosa vid
significa qui?
In realtà ho bisogno di questo perché quando provo a inserire una semplice regola per inserire una riga in crm_history usando questa query:
$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) . "')");
Popola la tabella del database ma non viene visualizzata nella vista. Mostra solo la vista quando aggiungo tramite la pagina di creazione del contenuto.