title: MYSQLI query to get one single result
body: <p>I need to get only the id of member who's username is X from the mysql database.
  Can this only be done with a while loop or is there any other way around this?</p>
  
  <p>What I'm thinking of is something like:</p>
  
  <pre><code>$id = mysqli_query($con,'SELECT id FROM membrs WHERE username = '$username' LIMIT 1)
  </code></pre>
  
  <p>Thanks,</p>