Skip to content
Snippets Groups Projects
Commit b876299f authored by Gabriel Frey's avatar Gabriel Frey
Browse files

Ajout MyPDO.php

parent 608230eb
Branches
No related merge requests found
<?php
require_once('bdd.php');
class MyPDO
{
private static ?PDO $_pdo = null;
private function __construct() {}
public static function pdo() : PDO
{
global $SQL_DSN;
if ( self::$_pdo == null )
self::$_pdo = new PDO($SQL_DSN);
return self::$_pdo;
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment