summaryrefslogtreecommitdiff
path: root/includes/database.mysql.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/database.mysql.inc')
-rw-r--r--includes/database.mysql.inc32
1 files changed, 32 insertions, 0 deletions
diff --git a/includes/database.mysql.inc b/includes/database.mysql.inc
index 62e87f778..e3bd26d42 100644
--- a/includes/database.mysql.inc
+++ b/includes/database.mysql.inc
@@ -117,4 +117,36 @@ function db_affected_rows() {
return mysql_affected_rows();
}
+/**
+ * Generates a limited query
+ *
+ * @param string $query query
+ * @param integer $from the row to start to fetching
+ * @param integer $count the numbers of rows to fetch
+ *
+ * @return mixed a DB_Result object or a DB_Error
+ *
+ * @access public
+ */
+function db_query_range($query, $from, $count) {
+ $query .= " LIMIT $from, $count";
+ // TODO: debug version
+ return db_query($query);
+}
+
+/**
+ * Generates a limited query
+ *
+ * @param string $query query
+ * @param integer $from the row to start to fetching
+ * @param integer $count the numbers of rows to fetch
+ *
+ * @access public
+ */
+function db_query_range($query, $from, $count) {
+ $query .= " LIMIT $from, $count";
+ // TODO: debug version
+ return db_query($query);
+}
+
?> \ No newline at end of file