Gossamer Forum
Home : Products : DBMan : Installation :

How do I detect the page I'm in? (was Top ten)

Quote Reply
How do I detect the page I'm in? (was Top ten)
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.
Quote Reply
Re: How do I detect the page I'm in? (was Top ten) In reply to
This should really be posted in the Discussion Forum since you already have DBMAN installed properly.

Wink

Regards.

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: How do I detect the page I'm in? (was Top ten) In reply to
I'm sorry, I thought it was about configuration. I'm posting the message in the discussion section right now. Sorry for the mess.