Force order by id as second sorting key

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-06-16 13:17:56 +02:00
parent 47f84836d7
commit 6d2971a548

View File

@@ -49,7 +49,7 @@ class StackMapper extends DeckMapper implements IPermissionMapper {
public function findAll($boardId, $limit = null, $offset = null) { public function findAll($boardId, $limit = null, $offset = null) {
$sql = 'SELECT * FROM `*PREFIX*deck_stacks` WHERE `board_id` = ? AND deleted_at = 0 ORDER BY `order`'; $sql = 'SELECT * FROM `*PREFIX*deck_stacks` WHERE `board_id` = ? AND deleted_at = 0 ORDER BY `order`, `id`';
return $this->findEntities($sql, [$boardId], $limit, $offset); return $this->findEntities($sql, [$boardId], $limit, $offset);
} }