private function __construct() { try { self::$bd = new PDO('mysql:host=localhost;dbname=contabilidad', 'root', ''); self::$bd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (PDOException $e) { echo "Connection Error: " . $e->getMessage(); } }
private function __construct() { try { self::$bd = new PDO('mysql:host=mysql.hostinger.es;dbname=u174001298_hard', 'u174001298_root', 'secret'); self::$bd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (PDOException $e) { echo "Connection Error: " . $e->getMessage(); } }
private function __construct() { try { self::$bd = new PDO("mysql:host={$this->equipo};dbname={$this->basedatos}", $this->usuario, $this->contrasenya); } catch (PDOException $e) { echo "Connection Error: " . $e->getMessage(); die; } }
private function __construct() { try { self::$bd = new PDO('mysql:host=localhost;dbname=vinilajax;charset=utf8', 'root', ''); self::$bd->exec("set names utf8"); self::$bd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (PDOException $e) { echo "Connection Error: " . $e->getMessage(); } }
private function __construct() { try { self::$bd = new PDO('mysql:host=fdb6.atspace.me;dbname=2063414_vinil;charset=utf8', '2063414_vinil', 'entrar08'); self::$bd->exec("set names utf8"); self::$bd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (PDOException $e) { echo "Connection Error: " . $e->getMessage(); } }