title: mysqli fetch_object() throwing an error
body: <p>Os i'm starting to use mysqli, i'm getting a little confused with how it works.</p>
  
  <p>So i have a function:</p>
  
  <pre><code>function verify_payment_date()
  {
      $today = date("Y-m-d");
  
      $email = $_SESSION['email'];
  
      $result = $this-&gt;conn-&gt;query("SELECT * FROM user WHERE email=$email");
  
      while ($row = $result-&gt;fetch_object())
      {
          $next_payment_date = $row['next_payment_date'];
      }
  }
  </code></pre>
  
  <p>To set up my connect i do this in the same class:</p>
  
  <pre><code> private $conn;
  
  function __construct() 
  {
      $this-&gt;conn = new mysqli(DB_SERVER, DB_USER, DB_PASSWORD, DB_NAME) or 
                    die('There was a problem connecting to the database.');
  }
  </code></pre>
  
  <p>can anyone give me a helping hand here because i'm totally lost. I was basing some of the code on this website:
  <a href="http://www.willfitch.com/mysqli-tutorial.html" rel="nofollow">http://www.willfitch.com/mysqli-tutorial.html</a></p>
  
  <p>Also the error i'm getting is:</p>
  
  <p>Fatal error: Call to a member function fetch() on a non-object in /home/vhosts/tradingeliteclub.com/subdomains/test/httpdocs/FES/members/classes/Mysql.php on line 52</p>
  
  <p>I'm not sure where to go from here.</p>
  
  <p>Thanks for your time and help.</p>