Projects/nettsiden-old
Projects
/
nettsiden-old
Archived
8
0
Fork 0

Fix dbactivity queries, missing a required column

This commit is contained in:
Peder Bergebakken Sundt 2018-02-10 18:01:53 +01:00
parent 6f2ab1ac00
commit 5dd2260948
1 changed files with 2 additions and 2 deletions

View File

@ -54,12 +54,12 @@ class DBActivity implements Activity {
public function getNextEventFrom(DateTimeImmutable $date) {
$query = 'SELECT name,start,stop,organiser,location,description FROM events WHERE start > :date ORDER BY start ASC LIMIT 1';
$query = 'SELECT id,name,start,stop,organiser,location,description FROM events WHERE start > :date ORDER BY start ASC LIMIT 1';
return $this->retrieve($date, $query);
}
public function getPreviousEventFrom(DateTimeImmutable $date) {
$query = 'SELECT name,start,stop,organiser,location,description FROM events WHERE start < :date ORDER BY start DESC LIMIT 1';
$query = 'SELECT id,name,start,stop,organiser,location,description FROM events WHERE start < :date ORDER BY start DESC LIMIT 1';
return $this->retrieve($date, $query);
}