Changeset 1702 for trunk/gregarius/cls

Show
Ignore:
Timestamp:
04/06/07 11:50:43 (19 months ago)
Author:
mbonetti
Message:

check that mysqli is installed and enabled

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/cls/db/db.mysqli.php

    r1701 r1702  
    4242 
    4343    function DBConnect($dbserver, $dbuname, $dbpass) { 
    44         $this -> _db = new mysqli($dbserver, $dbuname, $dbpass); 
     44         
     45        if (class_exists('mysqli')) { 
     46            $this -> _db = new mysqli($dbserver, $dbuname, $dbpass); 
     47        } else { 
     48            $this -> _db = false; 
     49        } 
     50         
    4551 
    4652        if(!$this -> _db) {