tbrehm
2008-12-06 a123dfe7e91f4af8f1a78313018ef24bffa03672
Updated mysql database library to support replication.
1 files modified
26 ■■■■■ changed files
server/lib/classes/db_mysql.inc.php 26 ●●●●● patch | view | raw | blame | history
server/lib/classes/db_mysql.inc.php
@@ -1,7 +1,6 @@
<?php
/*
Copyright (c) 2007, Till Brehm, projektfarm Gmbh
Copyright (c) 2005, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
@@ -34,7 +33,6 @@
    var $dbName = "";          // logical database name on that server
    var $dbUser = "";          // database authorized user
    var $dbPass = "";          // user's password
    var $dbCharset = "";      // what charset comes and goes to mysql: utf8 / latin1
    var $linkId = 0;          // last result of mysql_connect()
    var $queryId = 0;          // last result of mysql_query()
    var $record    = array();      // last record fetched
@@ -54,7 +52,6 @@
        $this->dbName = $conf["db_database"];
        $this->dbUser = $conf["db_user"];
        $this->dbPass = $conf["db_password"];
        $this->dbCharset = $conf["db_charset"];
        //$this->connect();
    }
@@ -81,7 +78,6 @@
                $this->updateError('DB::connect()<br />mysql_connect');
                return false;
            }
            $this->queryId = @mysql_query('SET NAMES '.$this->dbCharset, $this->linkId);
        }
        return true;
    }
@@ -227,13 +223,23 @@
       }
   }
   
   function closeConn() {
       public function closeConn()
        {
            if($this->linkId)
            {
                mysql_close($this->linkId);
                return true;
            } else { return false; }
   }
   
   function freeResult() {
        public function freeResult($query)
        {
            if(mysql_free_result($query))
            {
                return true;
            } else {
                return false;
            }
   }
   
   function delete() {