Ticket #94 (closed defect: Fixed)
Bad SQL query in genExtendedInfos.php since 5809
| Reported by: | polymorf | Owned by: | jmathis |
|---|---|---|---|
| Priority: | major | Milestone: | Centreon-2.0 |
| Component: | CentWeb | Version: | beta5 |
| Keywords: | genExtendedInfos | Cc: |
Description
"centreon/www/include/configuration/configGenerate/genExtendedInfos.php"
5808 : $DBRESULT =& $pearDB->query("SELECT host_id, host_name FROM host WHERE host_register = '1' AND host_activate = '1' ORDER BY host_name");
5809 : $DBRESULT =& $pearDB->query("SELECT host_id, host_name FROM host, extended_host_information WHERE host_activate = '1' AND ehi_notes IS NOT NULL AND ehi_notes_url IS NOT NULL AND ehi_action_url IS NOT NULL AND ehi_icon_image IS NOT NULL AND ehi_icon_image_alt IS NOT NULL AND ehi_vrml_image IS NOT NULL AND ehi_statusmap_image IS NOT NULL AND ehi_2d_coords IS NOT NULL AND ehi_3d_coords IS NOT NULL AND host_register = '1' AND host_activate = '1' ORDER BY host_name");
in 5809, it's missing the table link like "AND host_host_id = host_id".
With all the "IS NOT NULL" if a null field exist then the hostext info for this host is not generated.
Sory for my bad english.
