Skip to content

Commit c65a99c

Browse files
committed
change row to r everywhere; see : https://sourceforge.net/p/postfixadmin/discussion/676076/thread/616c1d25/?limit=25#7da0 - hopefully removing "row" which might be a reserved keyword for some databases etc
1 parent 938d717 commit c65a99c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

functions.inc.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,8 @@ function create_page_browser($idxfield, $querypart) {
544544
if (db_pgsql()) {
545545
$query = "
546546
SELECT * FROM (
547-
SELECT $idxfield AS label, nextval('rowcount') AS row $querypart
548-
) idx WHERE MOD(idx.row, $page_size) IN (0,$page_size_zerobase) OR idx.row = $count_results
547+
SELECT $idxfield AS label, nextval('rowcount') AS r $querypart
548+
) idx WHERE MOD(idx.r, $page_size) IN (0,$page_size_zerobase) OR idx.r = $count_results
549549
";
550550
}
551551

@@ -554,9 +554,9 @@ function create_page_browser($idxfield, $querypart) {
554554
$end = $bits[1];
555555
$query = "
556556
WITH idx AS (SELECT * $querypart)
557-
SELECT $end AS label, (SELECT (COUNT(*) - 1) FROM idx t1 WHERE t1.$end <= t2.$end ) AS row
557+
SELECT $end AS label, (SELECT (COUNT(*) - 1) FROM idx t1 WHERE t1.$end <= t2.$end ) AS r
558558
FROM idx t2
559-
WHERE (row % $page_size) IN (0,$page_size_zerobase) OR row = $count_results";
559+
WHERE (r % $page_size) IN (0,$page_size_zerobase) OR r = $count_results";
560560
}
561561

562562
# TODO: $query is MySQL-specific

0 commit comments

Comments
 (0)