Fatal error: Call to a member function fetch_assoc() on a non-object in directoryhere/database.php on line 13 : <p>I am getting  Fatal error: Call to a member function fetch_assoc() on a non-object in directoryhere/database.php on line 13</p>

<p>Here is the code in database.php file</p>

<pre><code>&lt;?php
$db = @new mysqli(DB_HOST, DB_USERNAME, DB_PASSWORD, DB_DATABASE); 

if($db-&gt;connect_error){
    die("&lt;h3&gt;Could not connect to the MySQL server.&lt;br /&gt;Please be sure that the MySQL details are correct.&lt;/h3&gt;");
}

function html($string) {
    return htmlentities(stripslashes($string), ENT_QUOTES, "UTF-8");
}

$config = $db-&gt;query("SELECT * FROM config");
$config = $config-&gt;fetch_assoc();
?&gt;
</code></pre>

<p>Tell me how can I get rid of this?
PHP Version - 5.5.38
I am trying to install this uptime checker script.</p>
