aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/database.php
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-28 11:21:05 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-28 11:21:05 +0000
commit098700aa6c409b844fd38299156927e4cd12a3b2 (patch)
tree9ab9d08c08897c080728022b72cf9a89435d3a4d /engine/lib/database.php
parentaa72d7cef5599ffea16193ede000bcf8d005fb18 (diff)
downloadelgg-098700aa6c409b844fd38299156927e4cd12a3b2.tar.gz
elgg-098700aa6c409b844fd38299156927e4cd12a3b2.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Fixed order/limit git-svn-id: https://code.elgg.org/elgg/trunk@738 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/database.php')
-rw-r--r--engine/lib/database.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/engine/lib/database.php b/engine/lib/database.php
index 73d22d28f..f18603d8c 100644
--- a/engine/lib/database.php
+++ b/engine/lib/database.php
@@ -516,13 +516,15 @@
else
throw new DatabaseException("No access control was provided on query");
+ // Order by
+ if (!empty($this->order))
+ $sql .= "{$this->order} ";
+
// Limits
if (!empty($this->limit_and_offset))
$sql .= "{$this->limit_and_offset} ";
- // Order by
- if (!empty($this->order))
- $sql .= $this->order;
+
} catch (Exception $e) {
trigger_error($e, E_USER_WARNING);