summaryrefslogtreecommitdiff
path: root/src/web/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/core')
-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;