Skip to content

Commit

Permalink
Cron - Daily
Browse files Browse the repository at this point in the history
Fixed trophy count/rarity if 0 earners.
  • Loading branch information
Ragowit committed Mar 27, 2024
1 parent 653936c commit 8b648e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wwwroot/cron/daily.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@
$query = $database->prepare("WITH
rarity AS(
SELECT
COUNT(*) AS trophy_owners,
COUNT(p.account_id) AS trophy_owners,
order_id
FROM
trophy_earned te
JOIN player p USING(account_id)
LEFT JOIN player p ON p.account_id = te.account_id AND p.status = 0 AND p.rank <= 50000
JOIN trophy t USING(np_communication_id, order_id)
WHERE
p.status = 0 AND p.rank <= 50000 AND te.np_communication_id = :np_communication_id AND te.earned = 1
te.np_communication_id = :np_communication_id AND te.earned = 1
GROUP BY te.order_id
ORDER BY NULL
)
Expand Down

0 comments on commit 8b648e6

Please sign in to comment.