Drop the superfluous `ORDER BY` clause
authorAlexander Ebert <ebert@woltlab.com>
Mon, 24 Oct 2022 14:47:17 +0000 (16:47 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 24 Oct 2022 14:47:17 +0000 (16:47 +0200)
This was required for the previous query that used `LIMIT … OFFSET` to fetch the data.

files/lib/system/exporter/IPB3xExporter.class.php

index e9bff955ea5776627e5fed116eec2abcc35caa49..a531c353a0de55ff1ce9ad7212b62573031488b1 100644 (file)
@@ -1192,8 +1192,7 @@ class IPB3xExporter extends AbstractExporter
                 FROM        " . $this->databasePrefix . "attachments
                 WHERE       attach_rel_module = ?
                         AND attach_rel_id > ?
-                        AND attach_id BETWEEN ? AND ?
-                ORDER BY    attach_id DESC";
+                        AND attach_id BETWEEN ? AND ?";
         $statement = $this->database->prepareStatement($sql, $limit, $offset);
         $statement->execute([
             $type,