Fix sql query for fetching report result counts
This commit is contained in:
parent
e24d67ecd3
commit
ad17c620b7
@ -24,10 +24,10 @@ public class ReportProfileRepository extends MinecraftRepository
|
||||
// todo test this query
|
||||
// todo optimize this query so it only needs run once per fetch
|
||||
private static final String GRAB_RESULT_COUNT = "SELECT COUNT(*) AS count " +
|
||||
" FROM reports, reportResults results, reportResults results " +
|
||||
" FROM reports, reportReasons reasons, reportResults results " +
|
||||
" WHERE results.reportId = reports.id " +
|
||||
" AND results.reportId = reports.id" +
|
||||
" AND results.reporterId = ?" +
|
||||
" AND reasons.reporterId = ?" +
|
||||
" AND reports.categoryId = ?" +
|
||||
" AND results.resultId = ?;";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user