title: How to count and limit record in a single query in MYSQL?
body: <p>I am searching for records in a table as follows:</p>
  
  <pre><code>SELECT Id, Name FROM my_table WHERE Name LIKE '%prashant%' LIMIT 0, 10;
  </code></pre>
  
  <p>Now, I am adding LIMIT to maintain my paging. But when user searches for word 'prashant' then total records I have is 124 for 'prashant'. But as the limit applied to the query so it only fetches 10 records in my PHP script and when I am count the mysql variable in PHP code it returns total records found is 10.</p>
  
  <p>So basically I want to count and Limit using a single query, by making some modification in the above query, I want the total count (124) of records. I don't want to run a separate count(*) query for just counting the total result found by the query.</p>
  
  <p>Thanks.</p>