From: Michael Andreen Date: Wed, 9 Jan 2008 12:47:01 +0000 (+0100) Subject: updated for new scans structure X-Git-Url: https://ruin.nu/git/?a=commitdiff_plain;h=ac3455192a0ac6ad50211103d7822baa8d7a0c22;p=ndwebbie.git updated for new scans structure --- diff --git a/NDWeb/Pages/Resources.pm b/NDWeb/Pages/Resources.pm index ef098e0..9267ecd 100644 --- a/NDWeb/Pages/Resources.pm +++ b/NDWeb/Pages/Resources.pm @@ -49,7 +49,7 @@ sub render_body { (s.size::int8*(1464-tick())*250)/100 + score + (resources/planets*LEAST(members,60))/300 AS nscore3, (s.size::int8*(1464-tick())*250)/100 AS scoregain3 FROM (SELECT alliance_id AS id,sum(metal+crystal+eonium) AS resources, count(*) AS planets - FROM planets p join covop_targets c ON p.id = c.planet GROUP by alliance_id) r + FROM planets p join planet_scans c ON p.id = c.planet GROUP by alliance_id) r NATURAL JOIN alliances a LEFT OUTER JOIN (SELECT * FROM alliance_stats WHERE tick = (SELECT max(tick) FROM alliance_stats)) s ON a.id = s.id ORDER BY $order