Retour CV
Ajouter
NUC |
Nom |
Prénom |
Age |
Certification |
Accrochage |
Modifier |
Supprimer |
class Database {
private static $dbHost;
private static $dbName;
private static $dbUsername;
private static $dbUserpassword;
private static $connection = null;
public static function connect() {
if(self::$connection == null) {
self::$dbHost = getenv('DB_HOST');
self::$dbName = getenv('DB_DATABASE');
self::$dbUsername = getenv('DB_USERNAME');
self::$dbUserpassword = getenv('DB_PASSWORD');
try {
self::$connection = new PDO("mysql:host=" . self::$dbHost . ";dbname=" . self::$dbName, self::$dbUsername,
self::$dbUserpassword);
} catch(PDOException $e) {
die($e->getMessage());
}
}
return self::$connection;
}
public static function disconnect() {
self::$connection = null;
}
}
Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /home/smartdev/domains/smartdev.compteweb.com/public_html/portfolio/nostitulaires/index2.php on line 44
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in /home/smartdev/domains/smartdev.compteweb.com/public_html/portfolio/nostitulaires/index2.php on line 46
Il n'y a pas encore de titulaire ajouté !