cvs: pear /MDB/MDB ibase.php oci8.php

From: Date: Tue, 23 Sep 2003 13:42:57 +0000
Subject: cvs: pear /MDB/MDB ibase.php oci8.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-13017@lists.php.net to get a copy of this message
lsmith Tue Sep 23 09:42:57 2003 EDT Modified files: /pear/MDB/MDB oci8.php ibase.php Log: fixes to fetchRow Index: pear/MDB/MDB/oci8.php diff -u pear/MDB/MDB/oci8.php:1.57 pear/MDB/MDB/oci8.php:1.58 --- pear/MDB/MDB/oci8.php:1.57 Tue Sep 23 08:56:53 2003 +++ pear/MDB/MDB/oci8.php Tue Sep 23 09:42:57 2003 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ -// $Id: oci8.php,v 1.57 2003/09/23 12:56:53 lsmith Exp $ +// $Id: oci8.php,v 1.58 2003/09/23 13:42:57 lsmith Exp $ require_once 'MDB/Common.php'; @@ -961,7 +961,7 @@ { $result_value = intval($result); if ($this->options['result_buffering']) { - if ($rownum == null) { + if (is_null($rownum)) { $rownum = $this->results[$result_value]['highest_fetched_row'] + 1; } if (isset($this->results[$result_value][$rownum])) { @@ -995,15 +995,11 @@ } while ($this->results[$result_value]['current_row'] < $rownum) { $this->results[$result_value]['current_row']++; - if ($fetchmode == MDB_FETCHMODE_ASSOC) { - $moredata = @OCIFetchInto($result, $row, OCI_ASSOC+OCI_RETURN_NULLS); - $row = array_change_key_case($row); - } else { - $moredata = @OCIFetchInto($result, $row, OCI_RETURN_NULLS); - } + $moredata = @OCIFetchInto($result, $row, OCI_ASSOC+OCI_RETURN_NULLS); if (!$moredata) { return null; } + $row = array_change_key_case($row); $this->results[$result_value][$this->results[$result_value]['current_row']] = $row; } if ($fetchmode == MDB_FETCHMODE_ASSOC) { Index: pear/MDB/MDB/ibase.php diff -u pear/MDB/MDB/ibase.php:1.55 pear/MDB/MDB/ibase.php:1.56 --- pear/MDB/MDB/ibase.php:1.55 Tue Sep 23 08:56:53 2003 +++ pear/MDB/MDB/ibase.php Tue Sep 23 09:42:57 2003 @@ -42,7 +42,7 @@ // | Author: Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.55 2003/09/23 12:56:53 lsmith Exp $ +// $Id: ibase.php,v 1.56 2003/09/23 13:42:57 lsmith Exp $ require_once 'MDB/Common.php'; @@ -923,7 +923,7 @@ { $result_value = intval($result); if ($this->options['result_buffering']) { - if ($rownum == null) { + if (is_null($rownum)) { $rownum = $this->results[$result_value]['highest_fetched_row'] + 1; } if (isset($this->results[$result_value][$rownum])) { @@ -957,21 +957,17 @@ } while ($this->results[$result_value]['current_row'] < $rownum) { $this->results[$result_value]['current_row']++; - if ($fetchmode == MDB_FETCHMODE_ASSOC) { - $row = @ibase_fetch_assoc($result); - $row = array_change_key_case($row); - } else { - $row = @ibase_fetch_row($result); + $row = @ibase_fetch_assoc($result); + if (!$row) { + return null; } + $row = array_change_key_case($row); //NOT SURE IF REALLY OK... basically it doesn't process $row if it's false if (is_array($row)) { foreach ($row as $key => $value_with_space) { - $row[$key] = rtrim($value_with_space); + $row[$key] = strtolower(rtrim($value_with_space)); } } - if (!$row) { - return null; - } $this->results[$result_value][$this->results[$result_value]['current_row']] = $row; } if ($fetchmode == MDB_FETCHMODE_ASSOC) { @@ -984,17 +980,17 @@ } else { if ($fetchmode == MDB_FETCHMODE_ASSOC) { $row = @ibase_fetch_assoc($result); - $row = array_change_key_case($row); } else { $row = @ibase_fetch_row($result); } + if (!$row) { + return null; + } + $row = array_change_key_case($row); if (is_array($row)) { foreach ($row as $key => $value_with_space) { $row[$key] = rtrim($value_with_space); } - } - if (!$row) { - return null; } } if (isset($this->results[$result_value]['types'])) {

« previous php.pear.cvs (#13017) next »