From 9526e68e3e910632a7e2b56303c186a29da31a08 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Thu, 17 Oct 2019 19:30:00 +0100 Subject: [PATCH] perhaps this will help https://github.com/postfixadmin/postfixadmin/issues/305 --- functions.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/functions.inc.php b/functions.inc.php index 16b0d8c6..308a0dfa 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -548,8 +548,11 @@ function create_page_browser($idxfield, $querypart, $sql_params = []) { } if (db_sqlite()) { - $bits = explode('.', $idxfield); - $end = $bits[1]; + $end = $idxfield; + if(strpos($idxfield, '.') !== false) { + $bits = explode('.', $idxfield); + $end = $bits[1]; + } $query = " WITH idx AS (SELECT * $querypart) SELECT $end AS label, (SELECT (COUNT(*) - 1) FROM idx t1 WHERE t1.$end <= t2.$end ) AS row