Is there anyway that I can get the number of rows that a query would have returned if I hadn't used the LIMIT clause?
I have a database with 6000 records and when I execute a query I want to page the results, but also need to know how many results there are altogether so that I can work out how many pages to offer etc...
For an example have a look at PHPMyAdmin, execute a quey on the database and at the top it will say "Showing rows 0 - 29 (62 total)".
How do I do this without executing the query twice (once with and once without the LIMIT clause)
Thanks
Hope this helps,
Phil Clare
I have a database with 6000 records and when I execute a query I want to page the results, but also need to know how many results there are altogether so that I can work out how many pages to offer etc...
For an example have a look at PHPMyAdmin, execute a quey on the database and at the top it will say "Showing rows 0 - 29 (62 total)".
How do I do this without executing the query twice (once with and once without the LIMIT clause)
Thanks
Hope this helps,
Phil Clare