[PATCH] DB::oci8::fetchRow() should use fetchInto()

From: Date: Tue, 10 Jun 2003 11:57:24 +0000
Subject: [PATCH] DB::oci8::fetchRow() should use fetchInto()
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-17255@lists.php.net to get a copy of this message
see attached patch Tomas, since you're listed as a maintainer, could you please review, test, and eventually commit this patch? It so happens that it fixes a minor issue: fetchInto() lowercases the column names if told so by the $options array, but fetchRow() never does. The line numbers might be slightly off (I have other changes in this driver not submitted yet), but should apply cleanly. Thanks! -- If you cc me or remove the list(s) completely I'll most likely ignore your message. see http://www.eyrie.org./~eagle/faqs/questions.html

------------------------------------------------------------------------ rev 5: anonymous | 2003-06-10 13:40:45 +0200 (Tue, 10 Jun 2003) | 4 lines DB::oci8::fetchRow() standardized (calls fetchInto() instead of a half-assed reimplementation of what that method does) ------------------------------------------------------------------------ Index: DB/oci8.php =================================================================== --- DB/oci8.php (revision 4) +++ DB/oci8.php (revision 5) @@ -195,15 +195,11 @@ if ($fetchmode == DB_FETCHMODE_DEFAULT) { $fetchmode = $this->fetchmode; } - if ($fetchmode & DB_FETCHMODE_ASSOC) { - $moredata = @OCIFetchInto($result, $row, OCI_ASSOC + OCI_RETURN_NULLS + OCI_RETURN_LOBS); - } else { - $moredata = @OCIFetchInto($result, $row, OCI_RETURN_NULLS + OCI_RETURN_LOBS); + $res = $this->fetchInto ($result, $arr, $fetchmode, $rownum); + if ($res !== DB_OK) { + return $res; } - if (!$moredata) { - return NULL; - } - return $row; + return $arr; } // }}}
« previous php.pear.dev (#17255) next »