Example #1
0
 function __construct()
 {
     parent::__construct();
     try {
         $this->handler = new mysqli($this->hostname, $this->username, $this->password, $this->schema);
         if ($this->handler->connect_error) {
             throw new Exception('DB Connection Error');
         }
     } catch (Exception $exception) {
         echo 'Cannot connect to selected DB: ' . $exception->getMessage() . "\n";
     }
     $this->handler->autocommit(FALSE);
 }
Example #2
0
 function __construct($host, $name, $user, $password)
 {
     parent::__construct($host, $name, $user, $password);
 }