Skip to content

Commit c7bbda8

Browse files
g5botHuxinator
authored andcommitted
fix ticket-0735
1 parent 929e26b commit c7bbda8

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/Orm/Repository/CrewAssignmentRepository.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -217,16 +217,15 @@ public function getCrewsTop10(): array
217217
$rsm->addScalarResult('crewc', 'crewc', 'integer');
218218

219219
return $this->getEntityManager()->createNativeQuery(
220-
'SELECT sc.user_id, count(*) as crewc,
220+
'SELECT ca.user_id, count(*) as crewc,
221221
(SELECT race as factionid
222222
FROM stu_user u
223-
WHERE sc.user_id = u.id) as factionid
224-
FROM stu_crew_assign sc
223+
WHERE ca.user_id = u.id) as factionid
224+
FROM stu_crew_assign ca
225225
JOIN stu_spacecraft s
226-
ON sc.spacecraft_id = s.id
227-
WHERE sc.user_id > :firstUserId
228-
AND sc.user_id = s.user_id
229-
GROUP BY sc.user_id
226+
ON ca.spacecraft_id = s.id
227+
WHERE ca.user_id >= :firstUserId
228+
GROUP BY ca.user_id
230229
ORDER BY 2 DESC
231230
LIMIT 10',
232231
$rsm

0 commit comments

Comments
 (0)