title: php-mysql How to select the particular number of the row in mysql?
body: <p>I am new at this and learning the code.
  I want to create the php code which select the particular row.
  say 5th row or 6th row any row.
  I create the code like this </p>
  
  <pre><code>&lt;?php
  $servername = "localhost";
  $username = "test1";
  $password = "pass";
  $dbname = "test1";
  
  // Create connection
  $conn = new mysqli($servername, $username, $password, $dbname);
  // Check connection
  if ($conn-&gt;connect_error) {
      die("Connection failed: " . $conn-&gt;connect_error);
  } 
  
  $sql = "SELECT FIELD1, FIELD2 FROM mytable ";
  $result = $conn-&gt;query($sql);
  
  if ($result-&gt;num_rows &gt; 0)
  
  
   {
      // output data of each row
      while($row = $result-&gt;fetch_assoc()) {
          echo "id: " . $row["FIELD1"]. " - Name: " . $row["FIELD2"]. " &lt;br&gt;";
      }
  
  
  
  } else 
  {
      echo "0 results";
  }
  $conn-&gt;close();
  ?&gt;
  </code></pre>
  
  <p>THis code works fine but it give the all data of the table.I want to just select particular row number data.how to do this??</p>