<?php 
/****************************************************************/
/*          e-mo.pl © 2017                                      */
/*          http://www.e-mo.com.pl                              */
/*          e-mail: info@e-mo.pl                                */
/*          produkt: Action2osCommerce                          */
/*          wersja: 1.9.7                                       */
/*          webserwis: oscGold                                  */
/*          sciezka: https://www.e-mo.com.pl/plikit,1918,533545b244d7d.php*/
/*          data: 2017-09-25                                    */
/*          godz: 10:45:43                                      */
/****************************************************************/


class db{

private $user='jotte_oscgold';
private $haslo='Qqryq1122';
public $schema='jotte_oscgold';
public $port='3306';
public $host='localhost';
	public $Conn = '';
	public $errMsg = '';
	public $errNo = 0;
	
	function __construct(){
		
		try {
			$this->Conn = new PDO('mysql:host='.$this->host.';port='.$this->port.';dbname='.$this->schema,
								$this->user,
								$this->haslo			
			);
			$this->Conn->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true); 
			
			$sth = $this->Conn->prepare('SET Names \'utf8\'');
			
			$sth->execute();
			
			
		}	
		catch (Exception $e) {
  			$this->errMsg =$e->getMessage();
  			$this->errNo= $e->getCode();
  			
		}
	}
	public function Begin(){
		$this->Conn->beginTransaction();
	}	
	public function Commit(){		
		$this->Conn->commit();
	}
	public function Rollback(){	
		$this->Conn->rollBack();
	}

}

?>
