Bug #17989 Updated: Pear->db->oci8->numrows

From: Date: Tue, 02 Jul 2002 16:40:33 +0000
Subject: Bug #17989 Updated: Pear->db->oci8->numrows
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-7439@lists.php.net to get a copy of this message
ID: 17989 Updated by: mj@php.net Reported By: awu@elca.ch -Status: Open +Status: Closed Bug Type: PEAR related Operating System: all PHP Version: 4.2.0 New Comment: This bug has been fixed in CVS. You can grab a snapshot of the CVS version at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2002-06-26 04:57:31] awu@elca.ch Numrows function for Oracle does not return the correct number if "DISTINCT" is used in the query. ("distinct" is dropped..) have a look at /PEAR/DB/oci8.php line 268: numRows function: $countquery = preg_replace('/^\s*SELECT\s+(.*?)\s+FROM\s+/is','SELECT COUNT(*) FROM ',$this->last_query); doesn't work for queries with the keyword "DISTINCT" I suggest you something really more simple: $countquery = "SELECT count(*) FROM (".$this->last_query.")"; bye! ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17989&edit=1

« previous php.pear.dev (#7439) next »