]> git.sesse.net Git - pr0n/commitdiff
Fix an SQL syntax error.
authorSteinar H. Gunderson <sesse@debian.org>
Sun, 30 Jul 2006 14:27:00 +0000 (16:27 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Sun, 30 Jul 2006 14:27:00 +0000 (16:27 +0200)
perl/Sesse/pr0n/Common.pm

index c6f1c5b59fb87b89c375cde62b3967178dbe4ed8..1472b7991915c286ae34e894e4c58e43c6005ae1 100644 (file)
@@ -192,7 +192,7 @@ sub update_width_height {
 
        # update the last_picture cache as well (this should of course be done
        # via a trigger, but this is less complicated :-) )
-       $dbh->do('UPDATE last_picture_cache SET last_picture=GREATEST(last_picture, ?) FROM images WHERE event=events.id) WHERE id=(SELECT event FROM images WHERE id=?)',
+       $dbh->do('UPDATE last_picture_cache SET last_picture=GREATEST(last_picture, ?) WHERE event=(SELECT event FROM images WHERE id=?)',
                undef, $datetime, $id)
                or die "Couldn't update last_picture in SQL: $!";
 }