From a6a34835693f84b153f25c28c4a94823f1d97946 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Mon, 28 May 2012 17:27:17 +0000 Subject: [PATCH] Some things are easier than you might think... functions.inc.php: - create_page_browser(): Fix count() query for pgsql. Fixes https://sourceforge.net/tracker/?func=detail&aid=3292648&group_id=191583&atid=937964 - surprise: the query to actually generate the pagebrowser already works with pgsql :-) git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1392 a1433add-5e2c-0410-b055-b7f2511e0802 --- functions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions.inc.php b/functions.inc.php index b469217d..37b4afb4 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -478,7 +478,7 @@ function create_page_browser($idxfield, $querypart) { } # get number of rows - $query = "SELECT count(*) as counter $querypart"; + $query = "SELECT count(*) as counter FROM (SELECT $idxfield $querypart) AS tmp"; $result = db_query ($query); if ($result['rows'] > 0) { $row = db_array ($result['result']);