diff options
author | Freya Murphy <freya@freyacat.org> | 2024-04-02 18:13:02 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-04-02 18:13:02 -0400 |
commit | 7e2553646c27cae8baaca1cc5c13d980661b5d90 (patch) | |
tree | 822b9a2184834fd8913d7a3d8cfe5cf0005c1728 /src/web/core/database.php | |
parent | start custom banner and avatar loading (diff) | |
download | xssbook2-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.php | 14 |
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; |