Changeset 986

Show
Ignore:
Timestamp:
08/27/08 08:27:40 (3 months ago)
Author:
areski
Message:

change from mysql to mysqli and enable autocommit

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/common/lib/admin.defines.php

    r985 r986  
    158158        /*      $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;  */ 
    159159         
    160         if (DB_TYPE == "postgres")
     160        if (DB_TYPE == "postgres")
    161161                $datasource = 'pgsql://'.USER.':'.PASS.'@'.HOST.'/'.DBNAME; 
    162162        }else{ 
     
    166166        $DBHandle = NewADOConnection($datasource); 
    167167        if (!$DBHandle) die("Connection failed"); 
     168         
     169        if (DB_TYPE == "mysqli") { 
     170                $DBHandle -> Execute('SET AUTOCOMMIT=1'); 
     171        } 
    168172         
    169173        return $DBHandle; 
  • trunk/common/lib/agent.defines.php

    r835 r986  
    169169        if (!$DBHandle) die("Connection failed"); 
    170170         
     171        if (DB_TYPE == "mysqli") { 
     172                $DBHandle -> Execute('SET AUTOCOMMIT=1'); 
     173        } 
     174         
    171175        return $DBHandle; 
    172176} 
  • trunk/common/lib/Class.A2Billing.php

    r985 r986  
    25602560                $this->DBHandle = NewADOConnection($datasource); 
    25612561                if (!$this->DBHandle) die("Connection failed"); 
    2562  
     2562                 
     2563                if (DB_TYPE == "mysqli") { 
     2564                        $DBHandle -> Execute('SET AUTOCOMMIT=1'); 
     2565                } 
     2566                 
    25632567                return true; 
    25642568        } 
  • trunk/common/lib/customer.defines.php

    r955 r986  
    170170        if (!$DBHandle) die("Connection failed"); 
    171171         
     172        if (DB_TYPE == "mysqli") { 
     173                $DBHandle -> Execute('SET AUTOCOMMIT=1'); 
     174        } 
     175         
    172176        return $DBHandle; 
    173177} 


Google