DB.php bug with oci8

From: Date: Tue, 27 Mar 2001 16:56:27 +0000
Subject: DB.php bug with oci8
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-115@lists.php.net to get a copy of this message
Hi all, The fetchRow() function in the latest DB.php (1.54) is broken with my Oracle. This kind of code: $sql = "SELECT * FROM table_name WHERE whatever = whatever"; if (DB::isError ($result = $db_con -> query ($sql))) echo DB::errorMessage($result); else while ($resultRow = $result -> fetchRow()) { echo $resultRow[0] . '<BR>'; } ... retrieves the desired results, then produces this error: Warning: Undefined index: in /usr/local/lib/php/DB/common.php on line 127 ... once, then this one: Warning: Undefined offset: 1002 in /usr/local/lib/php/DB/common.php on line 127 ... in an infinite loop until the script dies. Simply replacing the fetchRow() function with the same one from DB.php, 1.53 fixes the problem. I posted something similar earlier this week (look for 'oci8.php bugfix') which was fixed in 1.52. Is there a problem, generally, checking for 'no more rows'/EOF with Oracle? (latest PEAR DB.php, PEAR.php, common.php, oci8.php classes from CVS, Oracle 8.1.6 Linux, php 4.04pl1) All the best, -- Paul Rees

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