aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/SQLQuery.php
diff options
context:
space:
mode:
authorRasmus Fuhse <fuhse@data-quest.de>2023-07-11 13:49:47 +0000
committerRasmus Fuhse <fuhse@data-quest.de>2023-07-11 13:49:47 +0000
commite234779f2cf3195b2a14a4179f05c31038e478be (patch)
tree6eed77119dd36103f8164556123e7198b15aef93 /lib/classes/SQLQuery.php
parent3beb9a1c6a6d5df15ac0fc3d856b44c9da2faeec (diff)
Resolve "Umstellung der Adminseite für Veranstaltungen auf vue.js"
Closes #1965 Merge request studip/studip!1280
Diffstat (limited to 'lib/classes/SQLQuery.php')
-rw-r--r--lib/classes/SQLQuery.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/classes/SQLQuery.php b/lib/classes/SQLQuery.php
index 3a09fd9..0442604 100644
--- a/lib/classes/SQLQuery.php
+++ b/lib/classes/SQLQuery.php
@@ -283,20 +283,20 @@ class SQLQuery
$on = isset($joindata['on']) ? " ON ({$joindata['on']})" : '';
$sql .= " " . (isset($joindata['join']) ? $joindata['join'] : 'INNER JOIN') . " {$table}{$on} ";
}
- if ($this->settings['where']) {
+ if (!empty($this->settings['where'])) {
$sql .= "WHERE (" . implode(") AND (", $this->settings['where']) . ") ";
}
- if ($this->settings['groupby']) {
+ if (!empty($this->settings['groupby'])) {
$sql .= "GROUP BY {$this->settings['groupby']} ";
}
- if ($this->settings['having']) {
+ if (!empty($this->settings['having'])) {
$sql .= "HAVING (" . implode(") AND (", $this->settings['having']) . ") ";
}
- if ($this->settings['order']) {
+ if (!empty($this->settings['order'])) {
$sql .= "ORDER BY {$this->settings['order']} ";
}
- if ($this->settings['limit']) {
+ if (!empty($this->settings['limit'])) {
$sql .= "LIMIT ". (int) $this->settings['limit'][0] . ", " . (int) $this->settings['limit'][1] . " ";
}
return $sql;