Remove an unneeded ORDER BY.
authorSteinar H. Gunderson <sesse@debian.org>
Tue, 24 Jul 2007 21:36:14 +0000 (23:36 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Tue, 24 Jul 2007 21:36:14 +0000 (23:36 +0200)
perl/Sesse/pr0n/Index.pm

index 23b6e1499ef61e83fcad949d4f5d52382464a996..f28245cb0fdb609af5c087f88f2db052e43d56b2 100644 (file)
@@ -186,7 +186,7 @@ sub handler {
                                        TRIM(model.value) AS model,
                                        coalesce(TRIM(lens_spec.value), TRIM(lens.value)) AS lens,
                                        COUNT(*) AS num
-                               FROM ( SELECT * FROM images WHERE vhost=? $where ORDER BY (date - INTERVAL '6 hours')::date,takenby,date,filename ) i
+                               FROM ( SELECT * FROM images WHERE vhost=? $where ) i
                                        LEFT JOIN exif_info model ON i.id=model.image
                                        LEFT JOIN ( SELECT * FROM exif_info WHERE tag='Lens' ) lens ON i.id=lens.image
                                        LEFT JOIN ( SELECT * FROM exif_info WHERE tag='LensSpec') lens_spec ON i.id=lens_spec.image