Bug #8393 [NEW]: bug with numRows?

From: Date: Tue, 08 Aug 2006 21:45:08 +0000
Subject: Bug #8393 [NEW]: bug with numRows?
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-8276@lists.php.net to get a copy of this message
From: john dot maxwell at emory dot edu Operating system: Linux 2.4.21-40.EL Package version: PHP version: 4.3.2 Package: Documentation Bug Type: Bug Bug description: bug with numRows? Description: ------------ I really hope I'm not just being a stupid noob here, but I'm not, there's some inconsistency/vaguery in the documentation regarding numRows in MDB2. The short of it is, I'm getting: numrows: [Error message: method not implemented] [Last query: select * from table where recid < 100 ORDER BY recid] When I attempt to do a numRows on a result set by following the documentation that pertains to numRows. This isn't altogether surprising because the numRows function in MDB2.php reads: function numRows() { return $this->db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, 'method not implemented', __FUNCTION__); } I'm successfully using MDB2_Driver_oci8 for everything except this issue. That is to say, the query that I run in my test does indeed return data. Running Oracle 9. Test script: --------------- $options = array( 'debug' => 0, 'result_buffering' => false, 'emulate_database' => false, ); $query = "select * from table where recid < 100 ORDER BY recid"; $mdb2 =& MDB2::connect($dsn, $options); if (MDB2::isError($mdb2)) { die($mdb2->getMessage()); } $res =& $mdb2->query($query); while ($row = $res->fetchRow()) { echo $row[0]; } new dBug($res); $n = $res->numRows(); // $n =& $res->numRows(); breaks too if (MDB2::isError($n)) { echo "<div>ERRORed</div>"; new dBug($n); } Expected result: ---------------- I didn't expect to see any error returned. Actual result: -------------- Eh, you probably have enough information to identify the bug or call me an idiot. -- Edit bug report at http://pear.php.net/bugs/bug.php?id=8393&edit=1 --

« previous php.pear.doc (#8276) next »