title: Single result from database using mysqli
body: <p>I am trying to use mySQLi for the first time. I have done it in the case of loop. Loop results are showing but I am stuck when I try to show a single record. Here is loop code that is working.</p>
  <pre><code>&lt;?php
  // Connect To DB
  $hostname=&quot;localhost&quot;;
  $database=&quot;mydbname&quot;;
  $username=&quot;root&quot;;
  $password=&quot;&quot;;
  
  $conn = mysqli_connect($hostname, $username, $password, $database);
  ?&gt;
  
  &lt;?php
  $query = &quot;SELECT ssfullname, ssemail FROM userss ORDER BY ssid&quot;;
  $result = mysqli_query($conn, $query);
  $num_results = mysqli_num_rows($result);
  ?&gt;
  
  &lt;?php
  /*Loop through each row and display records */
  for($i=0; $i&lt;$num_results; $i++) {
  $row = mysqli_fetch_assoc($result);
  ?&gt;
  
  Name: &lt;?php print $row['ssfullname']; ?&gt;
  &lt;br /&gt;
  Email: &lt;?php print $row['ssemail']; ?&gt;
  &lt;br /&gt;&lt;br /&gt;
  
  &lt;?php 
  // end loop
  } 
  ?&gt;
  </code></pre>
  <p>How do I show a single record, any record, name, or email, from the first row or whatever, just a single record, how would I do that?
  In a single record case, consider all the above loop part removed and let's show any single record without a loop.</p>