From 1d4635898e5801535eac20bb1a807e6a7a6548d5 Mon Sep 17 00:00:00 2001 From: Pek5892 Date: Fri, 18 Nov 2022 17:58:22 +0100 Subject: [PATCH] Ottimizzazione query vista Campi personalizzati --- update/2_4_38.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/update/2_4_38.sql b/update/2_4_38.sql index 828a64bda..bf23990b2 100644 --- a/update/2_4_38.sql +++ b/update/2_4_38.sql @@ -301,3 +301,19 @@ HAVING ORDER BY `zz_modules`.`name`" WHERE `name` = 'Template email'; + +-- Ottimizzazione query vista Campi personalizzati +UPDATE `zz_views` INNER JOIN `zz_modules` ON `zz_views`.`id_module` = `zz_modules`.`id` SET `zz_views`.`query` = '`zz_fields`.`id`' WHERE `zz_modules`.`name` = 'Campi personalizzati' AND `zz_views`.`name` = 'id'; +UPDATE `zz_views` INNER JOIN `zz_modules` ON `zz_views`.`id_module` = `zz_modules`.`id` SET `zz_views`.`query` = '`zz_modules`.`NAME`' WHERE `zz_modules`.`name` = 'Campi personalizzati' AND `zz_views`.`name` = 'Modulo'; +UPDATE `zz_views` INNER JOIN `zz_modules` ON `zz_views`.`id_module` = `zz_modules`.`id` SET `zz_views`.`query` = '`zz_plugins`.`NAME`' WHERE `zz_modules`.`name` = 'Campi personalizzati' AND `zz_views`.`name` = 'Plugin'; +UPDATE `zz_views` INNER JOIN `zz_modules` ON `zz_views`.`id_module` = `zz_modules`.`id` SET `zz_views`.`query` = '`zz_fields`.`NAME`' WHERE `zz_modules`.`name` = 'Campi personalizzati' AND `zz_views`.`name` = 'Nome'; +UPDATE `zz_modules` SET `options` = "SELECT + |select| +FROM + `zz_fields` + LEFT JOIN `zz_modules` ON `zz_modules`.`id` = `zz_fields`.`id_module` + LEFT JOIN `zz_plugins` ON `zz_plugins`.`id` = `zz_fields`.`id_module` +WHERE + 1 = 1 +HAVING + 2 = 2" WHERE `name` = 'Campi personalizzati'; \ No newline at end of file