title: Mysql select query results in null row values using php
body: <p>**    <strong>Following query executes properly and gives exact result for login. But when I trying to access fields returned from the query, it shows me null. In below code, I've checked for correct email id and my column name is 'user_email', it validates the user login correctly, but when I was trying to access the same email id from returned result($checkLogin->user_email), it gives me null</strong> **    </p>
  
  <pre><code> $checkLogin=$db-&gt;query("SELECT * from `users` where
      `user_email`='$u_email' and `user_password`='$u_password'");
        if($checkLogin)
        {
          $data[]=array(
           'status'=&gt;'success',
           'email'=&gt;$u_email,
           'pass'=&gt;$u_password,
           'email1'=&gt;$checkLogin-&gt;user_email
          );
        }
  </code></pre>
  
  <p><strong>Please give me solution over this</strong></p>