<?php

namespace PhangoApp\PDO;

class MySQL {

    static public $host_db='';

    static public $db='';

    static public $login_db='';

    static public $pass_db='';
    
    //static public $conn=false;
    
    static public function get_pdo_connection() {
        
        if(MySQL::$host_db=='' || MySQL::$db=='') {
            
            echo 'Cannot connect to the mysqldb';
            
            exit();
            
        }
        
        $conn=new \PDO('mysql:host='.MySQL::$host_db.';dbname='.MySQL::$db, MySQL::$login_db, MySQL::$pass_db);
        
        return $conn;
        
    }

}
