Last modified: 2012-08-04 20:48:43 UTC
Created attachment 6142 [details] Rewrite LIMIT #,# to LIMIT # OFFSET # The current SELECT statement fails on PostgreSQL since it doesn't support LIMIT #,#, but both MySQL and PostgreSQL do support LIMIT # OFFSET #. The patch attached should make the SELECT statement work with both MySQL and PostgreSQL. http://dev.mysql.com/doc/refman/5.1/en/select.html http://www.postgresql.org/docs/8.3/static/sql-select.html
This should be using database abstraction functions -- in this case it should be possible to build the query more cleanly with Database::select(); alternately at least use Database::limitOffset() to generate the LIMIT/OFFSET portions in a way that'll work for the DB backend in use.
Created attachment 6180 [details] Rewrite of mwe-newestpages-r50851-hspaans-1.patch
Applied in r51295. Thanks.