I really meant 3 parameters as kate made it in ORACLE stuff.
authorAntoine Musso <hashar@users.mediawiki.org>
Tue, 9 Aug 2005 10:37:37 +0000 (10:37 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Tue, 9 Aug 2005 10:37:37 +0000 (10:37 +0000)
includes/Database.php

index 6422057..8d1e37d 100644 (file)
@@ -1277,12 +1277,15 @@ class Database {
        /**
         * Construct a LIMIT query with optional offset
         * This is used for query pages
+        * $sql string SQL query we will append the limit too
+        * $limit integer the SQL limit
+        * $offset integer the SQL offset (default false)
         */
-       function limitResult($limit, $offset=false) {
-               return " LIMIT ".((is_numeric($offset) && $offset != 0)?"{$offset},":"")."{$limit} ";
+       function limitResult($sql, $limit, $offset=false) {
+               return " $sql LIMIT ".((is_numeric($offset) && $offset != 0)?"{$offset},":"")."{$limit} ";
        }
-       function limitResultForUpdate($num) {
-               return $this->limitResult($num, 0);
+       function limitResultForUpdate($sql, $num) {
+               return $this->limitResult($sql, $num, 0);
        }
 
        /**