Example #1
0
 private function __construct()
 {
     $con = 'mysql:dbname=' . $this->name . ';host=' . $this->host;
     try {
         self::$db_obj = new PDO($con, $this->user, $this->pw, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING));
     } catch (PDOException $e) {
         echo $e;
         exit;
     }
 }