Gossamer Forum
Home : Products : DBMan : Customization :

10 to 20 out of total 30

Quote Reply
10 to 20 out of total 30
Hi, One more question:

I want to write on the search page the text -

Results 10-20 out of total 30.

I have the second number, which is the first result number + $numhits (the number of hits in this batch of results), and the last one which is $db_total_hits (the total number of hits).

But I don't have the number of the first result in the page.

I tried to maintain a count variable but it seems to reset when you move to ther results' second page.

Help? thanks, Alon Gal.
Quote Reply
Got it. In reply to
Never mind, I did it on my own.

if anyone intrested, it looks like this:

Code:
$first = $maxhits * $nh - $maxhits + 1;
$last = $first + $numhits - 1;print "$first to $last out of total $db_total_hits";