From f5c2a91d469df8a49364be887bf0a7a0e4b50c2f Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 30 Jul 2006 16:27:00 +0200 Subject: [PATCH] Fix an SQL syntax error. --- perl/Sesse/pr0n/Common.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perl/Sesse/pr0n/Common.pm b/perl/Sesse/pr0n/Common.pm index c6f1c5b..1472b79 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 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: $!"; } -- 2.39.2