title: Syntax Error for around LIMIT
body: <p>I'm working on a training course for PHP and I think the mysql syntax is outdated. This is the function</p>
  
  <pre><code>function get_subject_by_id($subject_id) {
      global $connection;
      $query = "SELECT * ";
      $query .= "FROM subjects ";
      $query .= "WHERE id=" . $subject_id ." ";
      $query .= "LIMIT 1";
      $result_set = mysql_query($query, $connection);
      confirm_query($result_set);
      if ($subject = mysql_fetch_array($result_set)) {
          return $subject;
      } else { 
              return NULL;
      }
  }
  </code></pre>
  
  <p>and I'm getting back this error:
  Database query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1</p>
  
  <p>I'm not sure what I'm doing wrong here. Any help from someone who knows what might have changed in the syntax would be greatly appreciated. </p>