Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.5.1

Bug #9601 rewriteCountQuery (Page_Wrapper.php) does not handle query with 'UNION' keyword
Submitted: 2006-12-12 17:04 UTC
From: s dot beni at planinformatica dot it Assigned: quipo
Status: Closed Package: Pager (version 2.4.3)
PHP Version: 4.4.4 OS: Win32
Roadmaps: (Not assigned)    
Subscription  


 [2006-12-12 17:04 UTC] s dot beni at planinformatica dot it (Sandro Beni)
Description: ------------ The function rewriteCountQuery into Page_Wrapper.php does not handle queries containing "UNION" keyword. I think that the following modifications at the beginning of the function can solve this problem: if (preg_match('/^\s*SELECT\s+\bDISTINCT\b/is', $sql) || preg_match('/\s+GROUP\s+BY\s+/is', $sql) || preg_match('/\s+UNION\s+/is', $sql)) { // patch return false; }

Comments

 [2006-12-12 17:26 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!