phpOpenTracker/phpOpenTracker/Database/Driver MSSQL.php,1.5,1.6 MySQL.php,1.5,1.6 Oracle.php,1.5,1.6 PostgreSQL.php,1.5,1.6

Sebastian Bergmann <[email protected]>
Newsgroups gmane.comp.web.phpopentracker.cvs
Message-ID <[email protected]>
Update of /cvsroot/phpopencounter/phpOpenTracker/phpOpenTracker/Database/Driver
In directory sc8-pr-cvs1:/tmp/cvs-serv21346/phpOpenTracker/Database/Driver

Modified Files:
	MSSQL.php MySQL.php Oracle.php PostgreSQL.php 
Log Message:
MFH: fetchRow() improvements.

Index: Oracle.php
===================================================================
RCS file: /cvsroot/phpopencounter/phpOpenTracker/phpOpenTracker/Database/Driver/Oracle.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Oracle.php	3 Jan 2004 14:06:53 -0000	1.5
--- Oracle.php	18 Jan 2004 15:55:21 -0000	1.6
***************
*** 37,47 ****
  
      protected function fetchRow() {
!         if (is_resource($this->result)) {
!             if (@OCIFetchInto($this->result, $result, OCI_ASSOC)) {
!                 return array_change_key_case($result, CASE_LOWER);
!             }
!         } else {
!             return false;
          }
      }
  
--- 37,47 ----
  
      protected function fetchRow() {
!         $row = @OCIFetchInto($this->result, $result, OCI_ASSOC));
! 
!         if (is_array($row)) {
!             return array_change_key_case($result, CASE_LOWER);
          }
+ 
+         return false;
      }
  

Index: MSSQL.php
===================================================================
RCS file: /cvsroot/phpopencounter/phpOpenTracker/phpOpenTracker/Database/Driver/MSSQL.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** MSSQL.php	3 Jan 2004 14:06:53 -0000	1.5
--- MSSQL.php	18 Jan 2004 15:55:21 -0000	1.6
***************
*** 41,50 ****
  
      protected function fetchRow() {
!         if (is_resource($this->result)) {
!             $row = @mssql_fetch_assoc($this->result);
  
!             if (is_array($row)) {
!                 return $row;
!             }
          }
  
--- 41,48 ----
  
      protected function fetchRow() {
!         $row = @mssql_fetch_assoc($this->result);
  
!         if (is_array($row)) {
!             return $row;
          }
  

Index: PostgreSQL.php
===================================================================
RCS file: /cvsroot/phpopencounter/phpOpenTracker/phpOpenTracker/Database/Driver/PostgreSQL.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** PostgreSQL.php	3 Jan 2004 14:06:53 -0000	1.5
--- PostgreSQL.php	18 Jan 2004 15:55:21 -0000	1.6
***************
*** 38,46 ****
  
      protected function fetchRow() {
!         if (is_resource($this->result)) {
!             return @pg_fetch_array($this->result);
!         } else {
!             return false;
          }
      }
  
--- 38,48 ----
  
      protected function fetchRow() {
!         $row = @pg_fetch_array($this->result);
! 
!         if (is_array($row)) {
!             return $row;
          }
+ 
+         return false;
      }
  

Index: MySQL.php
===================================================================
RCS file: /cvsroot/phpopencounter/phpOpenTracker/phpOpenTracker/Database/Driver/MySQL.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** MySQL.php	3 Jan 2004 14:06:53 -0000	1.5
--- MySQL.php	18 Jan 2004 15:55:21 -0000	1.6
***************
*** 24,33 ****
  
      protected function fetchRow() {
!         if (is_resource($this->result)) {
!             $row = @mysqli_fetch_assoc($this->result);
  
!             if (is_array($row)) {
!                 return $row;
!             }
          }
  
--- 24,31 ----
  
      protected function fetchRow() {
!         $row = @mysqli_fetch_assoc($this->result);
  
!         if (is_array($row)) {
!             return $row;
          }
  




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.