changes the db query and adopts the layout of the Vue component to show the correct betreff and content of the news

This commit is contained in:
SimonGschnell
2024-06-26 13:21:32 +02:00
parent f546554f87
commit 478adb740e
5 changed files with 45 additions and 55 deletions
+6 -2
View File
@@ -20,8 +20,12 @@ class News_model extends DB_Model
public function getAll($limit = null)
{
$this->addJoin("campus.tbl_content","content_id");
return $this->loadWhere('
text IS NOT NULL
return $this->execReadOnlyQuery('
SELECT *
FROM campus.tbl_news
JOIN campus.tbl_content content ON content.content_id = campus.tbl_news.content_id
WHERE
--text IS NOT NULL AND
datum <= NOW() AND (datum_bis IS NULL OR datum_bis >= now()::date)
ORDER BY datum DESC
LIMIT ' . $this->escape($limit)