From a96b694ed116f214eabdf82f87691512c3f48b62 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sun, 23 Apr 2023 00:40:29 +0200 Subject: [PATCH] fix period query --- src/Utils.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Utils.php b/src/Utils.php index edf21ef..f8a0b84 100644 --- a/src/Utils.php +++ b/src/Utils.php @@ -72,6 +72,7 @@ class Utils $sql->columns($params['columns']); } $sql->columns([ + 'T.periodical_id', 'T.periodical_title', 'T.periodical_curdt', 'T.periodical_enddt', @@ -93,9 +94,9 @@ class Utils if (!empty($params['where'])) { $sql->where($params['where']); - $sql->and('P.blog_id = ' . $sql->quote((string) dcCore::app()->blog?->id)); + $sql->and('T.blog_id = ' . $sql->quote((string) dcCore::app()->blog?->id)); } else { - $sql->where('P.blog_id = ' . $sql->quote((string) dcCore::app()->blog?->id)); + $sql->where('T.blog_id = ' . $sql->quote((string) dcCore::app()->blog?->id)); } if (isset($params['periodical_type'])) {