From a5a06ca36f23430efaeb73da1179866da5696ea3 Mon Sep 17 00:00:00 2001 From: Domas Mituzas Date: Thu, 15 Jul 2004 14:50:22 +0000 Subject: [PATCH] add Database->limitResult($limit,$offset) instead of old wfLimitResult. Allows several DB classes to be loaded concurrently. --- includes/Database.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/Database.php b/includes/Database.php index c1ba5cc94c..d101ccce69 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -696,6 +696,10 @@ class Database { } return $this->query( $sql, $fname ); } + + function limitResult($limit,$offset) { + return " LIMIT ".(is_numeric($offset)?"{$offset},":"")."{$limit} "; + } } class DatabaseMysql extends Database { @@ -759,5 +763,4 @@ function wfLimitResult( $limit, $offset ) { return " LIMIT ".(is_numeric($offset)?"{$offset},":"")."{$limit} "; } - ?> -- 2.20.1