Return to Snippet

Revision: 43021
at March 15, 2011 10:22 by JoF


Initial Code
<?php
try
{
	$pdo_options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_EXCEPTION;
	$bdd = new PDO('mysql:host=localhost;dbname=test', 'root', '', $pdo_options);
}
catch (Exception $e)
{
        die('Erreur : ' . $e->getMessage());
}
?>

Initial URL

                                

Initial Description

                                

Initial Title
Tester la présence d'erreurs à la connection

Initial Tags

                                

Initial Language
PHP