well I am having a problem with my class I made to connect to my DB ok here is the class
class database
{
private $db_host = 'localhost';
private $db_user = 'root';
private $db_pass = 'McSteel8';
private $db_database = 'cmte';
public function connect()
{
$this->link = mysqli_connect($this->db_host, $this->db_user, $this->db_pass);
mysqli_select_db($this->link, $this->db_database
}
public function select($table)
{
$sql = "select * from '$table'";
$result = mysqli_query($this->link, $sql);
if(!$result)
{
echo 'problems';
exit();
}
$row = mysqli_fetch_array($result);
return $row;
}
}
my problem is the mysqli_query for some reason it is not using $this->link how do I make it work?