title: Get Specific Column data using mysqli_result()
body: <p>I have a function which authenticates user for login.</p>
  
  <pre><code>$login_query = mysqli_query($GLOBALS['conn'],
  "SELECT COUNT(`user_id`) as `count`,`user_id` FROM `users`
       WHERE `user_email`='$email' AND `user_password` = '" . md5($password) . "'") or die(mysqli_error($GLOBALS['conn']));
  return ($mysqli_result-&gt;num_rows == 1) ? 
             mysqli_result($login_query, 0, 'user_id') : false;
  </code></pre>
  
  <p>I was using <code>mysql_*</code> and now switching to <code>mysqli_*</code>.</p>
  
  <p>What I want to know is that, in <code>return</code> statement how do I return <code>user_id</code> from the row that has been selected from DB?</p>