diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 71780ed4e5..8ffabc5ad4 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -2622,10 +2622,9 @@ function events_has_extended_info(int $id_event) { return (bool) db_get_value_sql( sprintf( - ' - SELECT count(*) as "n" - FROM tevent_extended WHERE id_evento=%d - ', + 'SELECT count(*) FROM ( + SELECT * as "n" + FROM tevent_extended WHERE id_evento=%d LIMIT 1) t', $id_event ) );