minor approach csv report

Former-commit-id: a875a42dc53c85942dd8f80f0b5a0f788fb39ca5
This commit is contained in:
fbsanchez 2019-03-26 10:55:50 +01:00
parent 39805c3f0c
commit 174256ab70
1 changed files with 2 additions and 3 deletions

View File

@ -3268,9 +3268,8 @@ function get_agent_first_time($agent_name)
$id = agents_get_agent_id($agent_name, true);
$utimestamp = db_get_all_rows_sql(
'SELECT utimestamp FROM tagente_datos WHERE id_agente_modulo IN
(SELECT id_agente_modulo FROM tagente_modulo WHERE id_agente = '.$id.')
ORDER BY utimestamp ASC LIMIT 1'
'SELECT min(utimestamp) FROM tagente_datos WHERE id_agente_modulo IN
(SELECT id_agente_modulo FROM tagente_modulo WHERE id_agente = '.$id.')'
);
$utimestamp = $utimestamp[0]['utimestamp'];