MySQL: Get total number of rows when using LIMIT
Every now and then you need to limit the number of rows MySQL returns, i.e. use the LIMIT clause. Result set pagination is by far the most often usage of LIMIT clause, since you usually want to select only rows you’ll be displaying on certain page. The problem is that for pagination you also need [...]