summaryrefslogtreecommitdiffstats
path: root/tools/infra-dashboard/utils/database.php
blob: b72c3d12a97d035c57dab8efb0df729cf22faaed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
    include '../../../../auth-db.php';
    date_default_timezone_set('UTC');
    function connectDB() {
        global $username;
        global $password;
        global $hostname;
        global $dbname;

        $dbhandle = mysql_connect($hostname, $username, $password)
            or die("Unable to connect to MySQL.".mysql_error());
        $selected = mysql_select_db($dbname,$dbhandle)
            or die("Could not select opnfv_pharos DB.");
    }

    function closeDB(){
        mysql_connect($dbhandle);
    }

?>