diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2016-06-01 23:00:08 +0200 |
---|---|---|
committer | jose.lausuch <jose.lausuch@ericsson.com> | 2016-06-02 20:12:49 +0200 |
commit | af427a992a96519c00ac9f98db8745f9fc1198fb (patch) | |
tree | 36f69164b289ce2405419f3946b7af0ba8f8b08e /tools/infra-dashboard/utils/database.php | |
parent | 43b44d05ed662d7e9e4f0a66b5f1744685d7b5cc (diff) |
OPNFV Infra Dashboard
JIRA: RELENG-12
Change-Id: I7451a3d234e4e5d946cdb905d5720be6159b6544
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'tools/infra-dashboard/utils/database.php')
-rw-r--r-- | tools/infra-dashboard/utils/database.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/infra-dashboard/utils/database.php b/tools/infra-dashboard/utils/database.php new file mode 100644 index 00000000..bacf3637 --- /dev/null +++ b/tools/infra-dashboard/utils/database.php @@ -0,0 +1,18 @@ +<?php + + date_default_timezone_set('UTC'); + function connectDB() { + $username = "root"; + $password = "opnfv"; + $hostname = "localhost"; + $dbhandle = mysql_connect($hostname, $username, $password) + or die("Unable to connect to MySQL."); + $selected = mysql_select_db("opnfv_pharos",$dbhandle) + or die("Could not select opnfv_pharos DB."); + } + + function closeDB(){ + mysql_connect($dbhandle); + } + +?> |