Added a modifier for COUNT(.+)...ORDER BY... to be handled correctly even when ther is a newline character

git-svn-id: https://plugins.svn.wordpress.org/postgresql-for-wordpress/trunk@542085 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
hawk__
2012-05-09 21:33:33 +00:00
parent 4cc22003a8
commit bdea3e9546

View File

@ -205,7 +205,7 @@
$sql = preg_replace( '/CAST\((.+) AS CHAR\)/', 'CAST($1 AS TEXT)', $sql);
// Handle COUNT(*)...ORDER BY...
$sql = preg_replace( '/COUNT(.+)ORDER BY.+/', 'COUNT$1', $sql);
$sql = preg_replace( '/COUNT(.+)ORDER BY.+/s', 'COUNT$1', $sql);
// In order for users counting to work...
$matches = array();