]> ruin.nu Git - ndwebbie.git/blobdiff - lib/NDWeb/Controller/JSRPC.pm
No need to have index on target modfication date
[ndwebbie.git] / lib / NDWeb / Controller / JSRPC.pm
index 3bea69a5405e5c14983503767410d1eaf2a28ea0..aade3c74ecd9d7b01dfc33dcf07fe54e827b5cf4 100644 (file)
@@ -38,7 +38,8 @@ sub update : Local {
 
        my $targets;;
        if ($from){
-               my ($timestamp) = $dbh->selectrow_array("SELECT MAX(modified)::timestamp AS modified FROM raid_targets");
+               my ($timestamp) = $dbh->selectrow_array(q{SELECT MAX(modified)::timestamp AS modified
+                       FROM raid_targets WHERE raid = $1},undef,$raid->{id});
                $c->stash(timestamp => $timestamp);
                $targets = $dbh->prepare(q{SELECT r.id,r.planet FROM raid_targets r
                        WHERE r.raid = ? AND modified > ?