X-Git-Url: https://git.sesse.net/?p=pr0n;a=blobdiff_plain;f=perl%2FSesse%2Fpr0n%2FCommon.pm;h=d03f46f1f01a01a10b656bb0efeb53aeb1adfb6e;hp=ecc039e15d8144cb9443891c0929d7cbf8e0d5e8;hb=d1b49fa6c2fd1b3d449dc938f0731c0426636c02;hpb=afdde4cd46e93bd49588a47029736c92d0c31ae0 diff --git a/perl/Sesse/pr0n/Common.pm b/perl/Sesse/pr0n/Common.pm index ecc039e..d03f46f 100644 --- a/perl/Sesse/pr0n/Common.pm +++ b/perl/Sesse/pr0n/Common.pm @@ -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 events 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, ?) FROM images WHERE event=events.id) WHERE id=(SELECT event FROM images WHERE id=?)', undef, $datetime, $id) or die "Couldn't update last_picture in SQL: $!"; }