my $dbh = $c->model;
my $query = $dbh->prepare(q{SELECT id, coords, metal, crystal, eonium
- , covop_alert(seccents,structures,gov,0) AS minalert
- , covop_alert(seccents,structures,gov,50) AS maxalert
+ , covop_alert(seccents,structures,size,guards,gov,0) AS minalert
+ , covop_alert(seccents,structures,size,guards,gov,50) AS maxalert
, distorters,gov
, MaxResHack,co.tick AS lastcovop
- FROM (SELECT p.id,coords(x,y,z), metal,crystal,eonium,
- seccents,NULLIF(ss.total::integer,0) AS structures,distorters
+ FROM (SELECT p.id,coords(x,y,z),size, metal,crystal,eonium,guards
+ ,seccents,NULLIF(ss.total::integer,0) AS structures,distorters
,max_bank_hack(metal,crystal,eonium,p.value
,(SELECT value FROM current_planet_stats WHERE id = ?)) AS MaxResHack
, planet_status, relationship,gov