gforge-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gforge-commits] gforge/common/include database.php,1.8,1.9


From: gsmet
Subject: [Gforge-commits] gforge/common/include database.php,1.8,1.9
Date: Thu, 15 Jan 2004 04:22:04 -0600

Update of /cvsroot/gforge/gforge/common/include
In directory db.perdue.net:/tmp/cvs-serv26960/common/include

Modified Files:
        database.php 
Log Message:
corrected minor problems which raised notices

Index: database.php
===================================================================
RCS file: /cvsroot/gforge/gforge/common/include/database.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- database.php        16 Feb 2003 06:27:30 -0000      1.8
+++ database.php        15 Jan 2004 10:21:59 -0000      1.9
@@ -90,10 +90,10 @@
        //      Now map the physical database connections to the
        //      "virtual" list that is used to distribute load in db_query()
        //
-       define(SYS_DB_PRIMARY,$conn);
-       define(SYS_DB_STATS,$conn2);
-       define(SYS_DB_TROVE,$conn2);
-       define(SYS_DB_SEARCH,$conn2);
+       define('SYS_DB_PRIMARY', $conn);
+       define('SYS_DB_STATS', $conn2);
+       define('SYS_DB_TROVE', $conn2);
+       define('SYS_DB_SEARCH', $conn2);
 
        // Register top-level "finally" handler to abort current
        // transaction in case of error
@@ -287,6 +287,9 @@
  */
 function db_fetch_array($qhandle) {
        global $sys_db_row_pointer;
+       if(!isset($sys_db_row_pointer[$qhandle])) {
+               $sys_db_row_pointer[$qhandle] = 0;
+       }
        $sys_db_row_pointer[$qhandle]++;
        return @pg_fetch_array($qhandle,($sys_db_row_pointer[$qhandle]-1));
 }
@@ -361,4 +364,4 @@
        }
 }
 
-?>
+?>
\ No newline at end of file





reply via email to

[Prev in Thread] Current Thread [Next in Thread]