From 4185707fedcb30f9a0bff80edc6ec69f871918b5 Mon Sep 17 00:00:00 2001 From: Alejandro Rosales Date: Tue, 8 Oct 2024 12:09:18 -0600 Subject: [PATCH] Listas con implode --- action/rutas_salón_horario.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/action/rutas_salón_horario.php b/action/rutas_salón_horario.php index fbd8c64..1cdd6bb 100644 --- a/action/rutas_salón_horario.php +++ b/action/rutas_salón_horario.php @@ -78,7 +78,9 @@ try { WHERE $fecha::DATE BETWEEN periodo.periodo_fecha_inicio AND periodo.periodo_fecha_fin AND horario_dia = EXTRACT(DOW FROM $fecha::DATE) AND bloque_horario.id = :bloque_horario_id - AND salon_view_mat.id_espacio_padre IN :id_espacio_sgu + AND salon_view_mat.id_espacio_padre IN ( + SQL . implode(', ', array_map(fn($s) => $s['id_espacio_sgu'], $data)) . << $s['id_espacio_sgu'], $data)) << $_GET['bloque_horario_id'], - 'id_espacio_sgu' => array_column($data, 'id_espacio_sgu'), ] ); $data = array_map(