summaryrefslogtreecommitdiffstats
path: root/tools/infra-dashboard/utils/database.php
diff options
context:
space:
mode:
Diffstat (limited to 'tools/infra-dashboard/utils/database.php')
-rw-r--r--tools/infra-dashboard/utils/database.php18
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);
+ }
+
+?>