From f406bdb02dad3f78e59b420867bcf8845349263c Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Mon, 29 Sep 2014 13:15:26 +0200 Subject: [PATCH] Now the report type 'serialized data' gets the data from the default and the historical database --- pandora_console/include/functions_reporting.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 23be23bf01..f8f8d5a2df 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -4778,19 +4778,21 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f $datelimit = $report["datetime"] - $content['period']; + // This query gets information from the default and the historic database $result = db_get_all_rows_sql('SELECT * FROM tagente_datos WHERE id_agente_modulo = ' . $content['id_agent_module'] . ' AND utimestamp > ' . $datelimit . ' - AND utimestamp <= ' . $report["datetime"]); + AND utimestamp <= ' . $report["datetime"], true); // Adds string data if there is no numeric data - if ((count($result) < 0) or (!$result)){ + if ((count($result) < 0) or (!$result)) { + // This query gets information from the default and the historic database $result = db_get_all_rows_sql('SELECT * FROM tagente_datos_string WHERE id_agente_modulo = ' . $content['id_agent_module'] . ' AND utimestamp > ' . $datelimit . ' - AND utimestamp <= ' . $report["datetime"]); + AND utimestamp <= ' . $report["datetime"], true); } if ($result === false) { $result = array();