phpOpenTracker/phpOpenTracker/DB mssql.php,1.13.4.1,1.13.4.1.2.1 mysql.php,1.22.4.1,1.22.4.1.2.1 oci8.php,1.13.4.1,1.13.4.1.2.1 pgsql.php,1.16.4.1,1.16.4.1.2.1

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

Modified Files:
      Tag: phpOpenTracker_1_4
	mssql.php mysql.php oci8.php pgsql.php 
Log Message:
DB improvements suggested by Lukas Smith.

Index: oci8.php
===================================================================
RCS file: /cvsroot/phpopencounter/phpOpenTracker/phpOpenTracker/DB/Attic/oci8.php,v
retrieving revision 1.13.4.1
retrieving revision 1.13.4.1.2.1
diff -C2 -d -r1.13.4.1 -r1.13.4.1.2.1
*** oci8.php	22 Dec 2003 03:36:29 -0000	1.13.4.1
--- oci8.php	18 Jan 2004 15:46:55 -0000	1.13.4.1.2.1
***************
*** 54,64 ****
    */
    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;
      }
    }
  
--- 54,64 ----
    */
    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/DB/Attic/mssql.php,v
retrieving revision 1.13.4.1
retrieving revision 1.13.4.1.2.1
diff -C2 -d -r1.13.4.1 -r1.13.4.1.2.1
*** mssql.php	22 Dec 2003 03:36:29 -0000	1.13.4.1
--- mssql.php	18 Jan 2004 15:46:55 -0000	1.13.4.1.2.1
***************
*** 59,68 ****
    */
    function fetchRow() {
!     if (is_resource($this->result)) {
!       $row = @mssql_fetch_assoc($this->result);
  
!       if (is_array($row)) {
!         return $row;
!       }
      }
  
--- 59,66 ----
    */
    function fetchRow() {
!     $row = @mssql_fetch_assoc($this->result);
  
!     if (is_array($row)) {
!       return $row;
      }
  

Index: pgsql.php
===================================================================
RCS file: /cvsroot/phpopencounter/phpOpenTracker/phpOpenTracker/DB/Attic/pgsql.php,v
retrieving revision 1.16.4.1
retrieving revision 1.16.4.1.2.1
diff -C2 -d -r1.16.4.1 -r1.16.4.1.2.1
*** pgsql.php	22 Dec 2003 03:36:29 -0000	1.16.4.1
--- pgsql.php	18 Jan 2004 15:46:55 -0000	1.16.4.1.2.1
***************
*** 55,63 ****
    */
    function fetchRow() {
!     if (is_resource($this->result)) {
!       return @pg_fetch_array($this->result);
!     } else {
!       return false;
      }
    }
  
--- 55,65 ----
    */
    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/DB/Attic/mysql.php,v
retrieving revision 1.22.4.1
retrieving revision 1.22.4.1.2.1
diff -C2 -d -r1.22.4.1 -r1.22.4.1.2.1
*** mysql.php	22 Dec 2003 03:36:29 -0000	1.22.4.1
--- mysql.php	18 Jan 2004 15:46:55 -0000	1.22.4.1.2.1
***************
*** 45,49 ****
        $connectionString,
        $this->config['db_user'],
!       $this->config['db_password']
      );
  
--- 45,50 ----
        $connectionString,
        $this->config['db_user'],
!       $this->config['db_password'],
!       true
      );
  
***************
*** 124,133 ****
    */
    function fetchRow() {
!     if (is_resource($this->result)) {
!       $row = @mysql_fetch_assoc($this->result);
  
!       if (is_array($row)) {
!         return $row;
!       }
      }
  
--- 125,132 ----
    */
    function fetchRow() {
!     $row = @mysql_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.