summaryrefslogtreecommitdiff
path: root/src/web/core/database.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/web/core/database.php (renamed from web/core/database.php)5
1 files changed, 5 insertions, 0 deletions
diff --git a/web/core/database.php b/src/web/core/database.php
index 079b0de..81352a9 100644
--- a/web/core/database.php
+++ b/src/web/core/database.php
@@ -122,6 +122,11 @@ class DatabaseQuery {
return $this;
}
+ public function order_by($column, $order = 'ASC') {
+ $this->query .= "ORDER BY " . $column . ' ' . $order . ' ';
+ return $this;
+ }
+
public function rows() {
$stmt = $this->conn->prepare($this->query);
try {