Fix minore

This commit is contained in:
Pek5892 2023-11-08 11:06:14 +01:00
parent dfcd04755e
commit d92f1b980e
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,7 @@ switch (filter('op')) {
$id = $id_record;
}
if ($dbo->fetchNum('SELECT * FROM `my_impianti` WHERE (`id_categoria`='.prepare($id).' ) AND `deleted_at` IS NULL') == 0) {
if ($dbo->fetchNum('SELECT * FROM `my_impianti` WHERE (`id_categoria`='.prepare($id).' OR `id_sottocategoria`='.prepare($id).' OR `id_sottocategoria` IN (SELECT id FROM `my_impianti_categorie` WHERE `parent`='.prepare($id).')) AND `deleted_at` IS NULL') == 0) {
$dbo->query('DELETE FROM `my_impianti_categorie` WHERE `id`='.prepare($id));
flash()->info(tr('_TYPE_ eliminata con successo!', [