]> ruin.nu Git - ndwebbie.git/commitdiff
No need to have index on target modfication date
authorMichael Andreen <harv@ruin.nu>
Wed, 28 Jan 2009 19:31:11 +0000 (20:31 +0100)
committerMichael Andreen <harv@ruin.nu>
Wed, 28 Jan 2009 22:50:18 +0000 (23:50 +0100)
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 > ?