ingenesis/shopp — pull request #2961 by kurtaschliman (2014-06-09 22:45:52+00:00)
Title: Add LIMIT 1 to coverimage subquery to get correct image using MariaDB

Add LIMIT 1 to subquery to make ORDER BY work with MariaDB. MariaDB ignores ORDER BY in a subquery unless LIMIT is used. Reference: https://mariadb.com/kb/en/why-is-order-by-in-a-from-subquery-ignored/. This provides a workaround using LIMIT, but could possibly use a further refactor to not use the subquery at all.