aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/db/mysql.php
diff options
context:
space:
mode:
authorLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-03-06 02:36:04 +0000
committerLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-03-06 02:36:04 +0000
commit4e503c05089bacf2cf070eebd24d6a358be35510 (patch)
tree4bb042e2fad8e5c05bb0a33e8ef480e75b48390a /phpBB/db/mysql.php
parent04e9ebb8244c43629652bec3c82ea8f233ba3fae (diff)
downloadforums-4e503c05089bacf2cf070eebd24d6a358be35510.tar
forums-4e503c05089bacf2cf070eebd24d6a358be35510.tar.gz
forums-4e503c05089bacf2cf070eebd24d6a358be35510.tar.bz2
forums-4e503c05089bacf2cf070eebd24d6a358be35510.tar.xz
forums-4e503c05089bacf2cf070eebd24d6a358be35510.zip
Switched up $total and $offset as per MySQL manual
git-svn-id: file:///svn/phpbb/trunk@3606 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/db/mysql.php')
-rw-r--r--phpBB/db/mysql.php32
1 files changed, 17 insertions, 15 deletions
diff --git a/phpBB/db/mysql.php b/phpBB/db/mysql.php
index 121d6be748..fe18cffa89 100644
--- a/phpBB/db/mysql.php
+++ b/phpBB/db/mysql.php
@@ -209,21 +209,23 @@ class sql_db
return ($this->query_result) ? $this->query_result : false;
}
- function sql_query_limit($query, $total, $offset = 0, $expire_time = 0)
- {
- if ($query != '')
- {
- $this->query_result = false;
- $this->num_queries++;
-
- $query .= ' LIMIT ' . ((!empty($offset)) ? $total . ', ' . $offset : $total);
-
- return $this->sql_query($query, $expire_time);
- }
- else
- {
- return false;
- }
+ // 20030406 Ashe: switched up $total and $offset as per MySQL manual
+ // Note for other DBALs: if $total == -1 we only want to set an offset (no pun intended)
+ function sql_query_limit($query, $total, $offset = 0, $expire_time = 0)
+ {
+ if ($query != '')
+ {
+ $this->query_result = false;
+ $this->num_queries++;
+
+ $query .= ' LIMIT ' . ((!empty($offset)) ? "$offset, $total" : $total);
+
+ return $this->sql_query($query, $expire_time);
+ }
+ else
+ {
+ return false;
+ }
}
// Idea for this from Ikonboard