|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-07-02 12:40 UTC] mj@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 00:00:01 2025 UTC |
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!