Skip to content

Commit

Permalink
Fix id selection
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Oct 18, 2021
1 parent 519c37c commit e20c051
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/BackgroundJob/GenerateUserSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ public function __construct(

protected function run($argument): void {
$query = $this->connection->getQueryBuilder();
$query->selectAlias('id', 'max_id')
$query->select('notification_id')
->from('notifications')
->orderBy('id', 'DESC')
->orderBy('notification_id', 'DESC')
->setMaxResults(1);

$result = $query->executeQuery();
Expand Down

0 comments on commit e20c051

Please sign in to comment.