MySql paging; "Showing result-set" of "total found" help
Posted
by Camran
on Stack Overflow
See other posts from Stack Overflow
or by Camran
Published on 2010-05-08T15:45:49Z
Indexed on
2010/05/08
15:58 UTC
Read the original article
Hit count: 140
I need a formula for showing results on my classifieds website.
I am now done with the paging of records, but this formula for showing results remains.
I want it like this:
Showing 1-50 of 123 found.
Now what is the formula for this?
I have these variables which should be enough I think:
$results_per_page = 50; //results per page
$page = 1; //current page
Also a variable called $num_total contains the total nr of hits, in this case 123.
Thanks
© Stack Overflow or respective owner