From 53560c521e594d6047f58a25ccbc266c56bbcf05 Mon Sep 17 00:00:00 2001 From: svncommit <devs@roundcube.net> Date: Thu, 20 Oct 2005 12:58:34 -0400 Subject: [PATCH] --- program/include/rcube_db.inc | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/program/include/rcube_db.inc b/program/include/rcube_db.inc index 2b0c01a..f732da2 100755 --- a/program/include/rcube_db.inc +++ b/program/include/rcube_db.inc @@ -103,7 +103,7 @@ // Query database (read operations) - function query($query) + function query($query, $offset=0, $numrows=0) { // Read or write ? if (strtolower(trim(substr($query,0,6)))=='select') @@ -115,8 +115,13 @@ if ($this->db_provider == 'sqlite') $query = $this->_sqlite_prepare_query($query); - - $result = $this->db_handle->query($query); + + if ($numrows || $offset) + { + $result = $this->db_handle->limitQuery($query,$offset,$numrows); + } + else + $result = $this->db_handle->query($query); if (DB::isError($result)) raise_error(array('code' => 500, -- Gitblit v1.9.1