File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments