From 65615dcf805bdb23864cd18932761ea595e426a8 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 25 Jan 2018 10:06:05 +0100 Subject: [PATCH] Fixed error sql --- .../reporting_builder.item_editor.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index b1dffe8e5b..e453fb6de1 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -362,7 +362,7 @@ switch ($action) { break; case 'sql': $description = $item['description']; - $sql = $item['external_source']; + $sql_query_report = $item['external_source']; $idCustom = $item['treport_custom_sql_id']; $header = $item['header_definition']; $historical_db = $item['historical_db']; @@ -940,7 +940,7 @@ You can of course remove the warnings, that's why we include the source and do n $agents = agents_get_group_agents($group); if ((empty($agents)) || $agents == -1) $agents = array(); - $sql = 'SELECT source + $sql_log = 'SELECT source FROM tagente,tagent_module_log WHERE tagente.id_agente = tagent_module_log.id_agent '; @@ -948,16 +948,16 @@ You can of course remove the warnings, that's why we include the source and do n $index = 0; foreach ($agents as $key => $a) { if ($index == 0) { - $sql .= ' AND (id_agente = ' . $key; + $sql_log .= ' AND (id_agente = ' . $key; } else { - $sql .= ' OR id_agente = ' . $key; + $sql_log .= ' OR id_agente = ' . $key; } $index++; } - $sql .= ")"; + $sql_log .= ")"; } - html_print_select_from_sql ($sql, 'source', $source, '', __('All'), '', false, false, false); + html_print_select_from_sql ($sql_log, 'source', $source, '', __('All'), '', false, false, false); ?> @@ -1076,10 +1076,10 @@ You can of course remove the warnings, that's why we include the source and do n $value) { $agents2[$value['id_agente']] = $value['alias']; @@ -1278,7 +1278,7 @@ You can of course remove the warnings, that's why we include the source and do n