title: MySQL LIMIT question
body: <p>I'm using pagination for my search results but for some reason my pagination is not working correctly with my search script. I can't seem to find the correct place to put the <code>LIMIT $start, $display</code> in my search query code where ever I put it in my code it displays the pagination all wrong. Can some one please help me?</p>
  
  <p>Here is the part of my PHP &amp; MySQL search code.</p>
  
  <pre><code>$mysqli = mysqli_connect("localhost", "root", "", "sitename");
  mysqli_select_db($mysqli, "sitename");
  
      $search_explode = explode(" ", $search);
  
      foreach($search_explode as $search_each) {
          $x++;
          if($x == 1){
              $construct .= "article_content LIKE '%$search_each%' OR title LIKE '%$search_each%' OR summary LIKE '%$search_each%'";
          } else {
              $construct .= "OR article_content LIKE '%$search_each%' OR title LIKE '%$search_each%' OR summary LIKE '%$search_each%'";
          }
  
      }
  
  $construct = "SELECT users.*, users_articles.* FROM users_articles
                INNER JOIN users ON users_articles.user_id = users.user_id
                WHERE $construct";
  $run =  mysqli_query($mysqli, $construct);
  
  $foundnum = mysqli_num_rows($run);
  </code></pre>
  
  <p>SQL statement.</p>
  
  <pre><code>SELECT users.*, users_articles.* FROM users_articles INNER JOIN users ON users_articles.user_id = users.user_id WHERE article_content LIKE '%find%' OR title LIKE '%find%' OR summary LIKE '%find%'OR article_content LIKE '%this%' OR title LIKE '%this%' OR summary LIKE '%this%'OR article_content LIKE '%article%' OR title LIKE '%article%' OR summary LIKE '%article%' LIMIT 0, 10
  </code></pre>