A few months ago JPDeni helped me adding a rank field to a high score page powered by DBMan. Basically, the rank works on a page by page basis. That means that if you have more records than those listed, and you go to page 2 of results, the count begins anew from 1 to the number of maxhits. I could solve this quite easily if I could determine the page I'm in. The nh value would be useful, but it looks like I can't use it as a variable. That's what I'd do in a perfect world where nh=1 in page 1, nh=2 in page 2, etc.:
$rank = ((($nh-1)*$mh)+1)+($nh-1)*25;
for (0 .. $numhits - 1) {
print "<P>";
&html_record (&array_to_hash($_, @hits));
++$rank
}
But, this ain't a perfect world and $nh equals always 0, as far as I understood.
Is there anyone who could lend me a hand? A lot of thanks in advance to anyone willing to try.
$rank = ((($nh-1)*$mh)+1)+($nh-1)*25;
for (0 .. $numhits - 1) {
print "<P>";
&html_record (&array_to_hash($_, @hits));
++$rank
}
But, this ain't a perfect world and $nh equals always 0, as far as I understood.
Is there anyone who could lend me a hand? A lot of thanks in advance to anyone willing to try.