Created
January 26, 2015 15:28
-
-
Save makamo/e789d9f84a4c40382349 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Connection; | |
class Connection { | |
public $Error; | |
public $Connection; | |
public $dataSourceName = "odbc:boreal"; | |
public function _construct(){ | |
try{ | |
$this->Connection = new \PDO($this->dataSourceName); | |
$this->Connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | |
}catch(PDOException $e){ | |
$this->Error = $e->getMessage(); | |
} | |
} | |
public function query($req){ | |
return $this->Connection->query($req); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
voici le resultat du var_dump