[FEAT] Add API to read the list of scores

This commit is contained in:
2020-11-12 22:21:52 +01:00
parent cf38fa26d7
commit 1579e54c09
5 changed files with 142 additions and 0 deletions

28
api/config/database.php Normal file
View File

@@ -0,0 +1,28 @@
<?php
class Database{
// specify your own database credentials
private $host = "localhost";
private $db_name = "ohmj2";
private $username = "ohmj2";
private $password = "2j9eywip";
private $connect_db;
public $conn;
public function connect ()
{
$this->connect_db = @mysql_connect ($this->host, $this->username, $this->password);
return true;
}
public function close ()
{
MYSQL_CLOSE;
}
public function execute($query)
{
return mysql_db_query($this->db_name, $query, $this->connect_db);
}
}