PHP-OOP | Not accessing database
<p>I'm trying to make this code access a certain row in the database and pull "title" from it to update public $Title in the UserBlog class, but, it's not doing so.</p>

<p>The database connection is definitely working as it worked procedually, but OOP is messing it up.</p>

<pre><code>$ID       = $db-&gt;real_escape_string(strip_tags(stripslashes($_GET['ID']))); // Page ID

class UserBlog
{
public $Title;
public $BannerImage;
public $ID;

public function GenerateBlog() {
    $FetchBlogDetails = mysqli_query($db, "SELECT * FROM UserBlogs WHERE ID = '$this-&gt;ID'");
    $FBL = mysqli_fetch_object($FetchBlogDetails);
    $this-&gt;Title = $FBL-&gt;Title;
}

public function FetchBlog() {

    return $this-&gt;Title;
    return $this-&gt;ID;

}


};

$GetBlog = new UserBlog();
$GetBlog-&gt;ID = $ID;

$GetBlog-&gt;GenerateBlog();

echo $GetBlog-&gt;Title;
echo $GetBlog-&gt;ID; 
</code></pre>