title: displaying mysql query while changing the page
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2807135/php-mysql-pagination-update-help">PHP &amp; MySQL Pagination Update Help</a>  </p>
  </blockquote>
  
  
  
  <p>So, in my site, there are 10 pages. In each page I want to show different rows from my table. (I am using MySQL for database and I got table called "A".)</p>
  
  <p>My rows from table in first page:</p>
  
  <pre><code>$result = mysql_query("SELECT * FROM A ORDER BY date DESC LIMIT 20");
  </code></pre>
  
  <p>My pages:</p>
  
  <pre><code>&lt;div class="pagenavi" &gt; 
      &lt;span class="pages"&gt;&lt;span&gt;&lt;a href="index.php"&gt;&lt;&lt;/a&gt;&lt;/span&gt;
      &lt;span class="currentpage"&gt;1&lt;/span&gt; -
      &lt;a href="/pages/page2.php"&gt;2&lt;/a&gt; -
      &lt;a href="/pages/page3.php"&gt;3&lt;/a&gt; - 
      &lt;a href="/pages/page4.php"&gt;4&lt;/a&gt; -  
      &lt;a href="/pages/page5.php"&gt;5&lt;/a&gt; -
      &lt;a href="/pages/page6.php"&gt;6&lt;/a&gt; -
      &lt;a href="/pages/page7.php"&gt;7&lt;/a&gt; - 
      &lt;a href="/pages/page8.php"&gt;8&lt;/a&gt; -
      &lt;a href="/pages/page9.php"&gt;9&lt;/a&gt; -
      &lt;a href="/pages/page10.php"&gt;10&lt;/a&gt;
      &lt;span id="nextpage"&gt;&lt;a href="/pages/page2.php" class="arrow"&gt;&gt;&lt;/a&gt;&lt;/span&gt;
      &lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>So, in different pages, I can show different rows by changing the limit value, but every time, it goes to another page, not efficient. What I want is that, to show different rows in same page without going another page(for example index.php). If those links were buttons, there would be no problem, but they are not. What can I do?</p>