[FEAT] Add API to read the list of scores
This commit is contained in:
28
api/config/database.php
Normal file
28
api/config/database.php
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user