summaryrefslogtreecommitdiff
path: root/src/web/core/database.php
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-04-02 18:13:02 -0400
committerFreya Murphy <freya@freyacat.org>2024-04-02 18:13:02 -0400
commit7e2553646c27cae8baaca1cc5c13d980661b5d90 (patch)
tree822b9a2184834fd8913d7a3d8cfe5cf0005c1728 /src/web/core/database.php
parentstart custom banner and avatar loading (diff)
downloadxssbook2-7e2553646c27cae8baaca1cc5c13d980661b5d90.tar.gz
xssbook2-7e2553646c27cae8baaca1cc5c13d980661b5d90.tar.bz2
xssbook2-7e2553646c27cae8baaca1cc5c13d980661b5d90.zip
finish profile directory (mostly)
Diffstat (limited to 'src/web/core/database.php')
-rw-r--r--src/web/core/database.php14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/web/core/database.php b/src/web/core/database.php
index 81352a9..e9b8109 100644
--- a/src/web/core/database.php
+++ b/src/web/core/database.php
@@ -46,6 +46,8 @@ class DatabaseQuery {
if (!$this->where) {
$this->where = TRUE;
$this->query .= "WHERE ";
+ } else {
+ $this->query .= "AND ";
}
$this->query .= "$cond ";
return $this;
@@ -85,6 +87,8 @@ class DatabaseQuery {
if (!$this->where) {
$this->where = TRUE;
$this->query .= "WHERE ";
+ } else {
+ $this->query .= "AND ";
}
if (empty($array)) {
$this->query .= "FALSE\n";
@@ -95,16 +99,6 @@ class DatabaseQuery {
return $this;
}
- public function and() {
- $this->query .= "AND ";
- return $this;
- }
-
- public function or() {
- $this->query .= "OR ";
- return $this;
- }
-
public function join($table, $on, $type = 'LEFT') {
$this->query .= "$type JOIN $table ON $on\n";
return $this;