When generating a count query using preg_replace, the replace is case sensitive. While I agree that SQL is easier to read when nicely cased, it isn't necessary for validity. Appending an 'i' to the parameters of the regex makes it more friendly. Line 65 in in includes/pager.inc
$count_query = preg_replace(array('/SELECT.*?FROM/As', '/ORDER BY .*/'), array('SELECT COUNT(*) FROM', ''), $query);
I suggest ammending to this
$count_query = preg_replace(array('/SELECT.*?FROM/Asi', '/ORDER BY .*/i'), array('SELECT COUNT(*) FROM', ''), $query);
Comments
Comment #1
killes@www.drop.org commentedDrupal coding standards mandate capitalization for SQL keywords,
Comment #2
elyobo commentedAh, OK. I'll file a bug in the module I found it in :)