Time for action – retrieve data from the database
Open the
setup.php
file from Example 3.Go to the
cbEnhancedInfo_tree_after
function.Search for the following code:
/* Example 3 - Data retrieval is missing here ---> */ /* <--- */
Between these two lines, enter the following code:
// Retrieve the enhanced information for that host from the table $host_longitude = db_fetch_cell(" SELECT longitude FROM plugin_cbEnhancedInfo_dataTable WHERE hostId=$host_leaf_id"); $host_latitude = db_fetch_cell(" SELECT latitude FROM plugin_cbEnhancedInfo_dataTable WHERE hostId=$host_leaf_id"); $host_contactAddress = db_fetch_cell(" SELECT contactAddress FROM plugin_cbEnhancedInfo_dataTable WHERE hostId=$host_leaf_id"); $host_additionalInformation = db_fetch_cell(" SELECT additionalInformation FROM plugin_cbEnhancedInfo_dataTable WHERE hostId=$host_leaf_id"); // Retrieve the host specific information from the host table $host_country = db_fetch_cell(" SELECT ebEnhancedInfo_country FROM host...