Ejemplo n.º 1
0
 public function SQLConnect()
 {
     try {
         self::$SQLHandle = new PDO("mysql:host=" . $this->SQLHost . ";dbname=" . $this->DBName . "", $this->SQLUser, $this->SQLPassword, array(PDO::ATTR_PERSISTENT => true));
     } catch (PDOException $e) {
         echo 'Connection failed: ' . $e->getMessage();
         exit(1);
     }
     self::$SQLHandle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
 }