title: How to get the first ID with SQL
body: <p>I am trying to get the first id with a specific date.
  So this is my code:</p>
  
  <pre><code>$checkm = "SELECT FIRST(id) FROM times WHERE date='2014-03-07'";
  $resultm = mysqli_query($con,$checkm);
  </code></pre>
  
  <p>I have a table called <code>times</code> and there are some columns. Two of them are <code>date</code> and <code>id</code>.</p>
  
  <p>I am trying to get the first row's id with the date <code>2014-03-07</code>.</p>
  
  <p><strong>EDIT:</strong> Fixed!</p>
  
  <pre><code>$checkm = "SELECT id FROM times WHERE date='2014-03-06' ORDER BY id ASC LIMIT 1";
  $resultm = mysqli_query($con,$checkm); 
  
  while($row = mysqli_fetch_array($resultm)) {
      $resultm1 = $row['id'];
  }
  </code></pre>