summaryrefslogtreecommitdiff
path: root/src/web/core/database.php
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-04-01 11:09:25 -0400
committerFreya Murphy <freya@freyacat.org>2024-04-01 11:09:25 -0400
commit3a82baec9d793edf81ac2b151b0f4d4159641375 (patch)
treef9d50c296b078ac48c2a2391c172c3ccf37edb3f /src/web/core/database.php
parentrefactor asset dir, refactor oberver in lib (diff)
downloadxssbook2-3a82baec9d793edf81ac2b151b0f4d4159641375.tar.gz
xssbook2-3a82baec9d793edf81ac2b151b0f4d4159641375.tar.bz2
xssbook2-3a82baec9d793edf81ac2b151b0f4d4159641375.zip
login and register, liking on homepage
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 {