con = new PDO("mysql:host=localhost;dbname=bucherei","bucherei", "bucherei"); } function getConnection(){ return $this->con; } function startTA() { $this->con->begin_transaction(); } function commit() { $this->con->commit(); } function rollback() { $this->con->rollback(); } // singleton static $instance = null; static function getInstance() { if (! isset(self::$instance)) { self::$instance = new DBMySQL(); } return self::$instance; } }