From: Steinar H. Gunderson Date: Sun, 30 Jul 2006 14:27:00 +0000 (+0200) Subject: Fix an SQL syntax error. X-Git-Url: https://git.sesse.net/?p=pr0n;a=commitdiff_plain;h=f5c2a91d469df8a49364be887bf0a7a0e4b50c2f;ds=sidebyside Fix an SQL syntax error. --- 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: $!"; }