title: mysql - how to count how many records there are in a table and then only get 20?
body: <p>I'm building a forum for a school project and I want to display only say 20 posts per page, for a forum. However, I still need to know how much total posts there are, to display the page listing.
  I could run a mysql query that limits the number of posts to 20, and then, run another query that would count how many records there are in a table, but that would be 2 queries. Isn't there a way to both get a limited number of records AND in the same query, to get the number of records total?</p>
  
  <p>Thanks.</p>