[ic] [More-list] - Missing Results??

Kevin Walsh kevin at cursor.biz
Wed Jul 26 13:35:12 EDT 2006


"William Fiore" <wfiore at aftermarketcellular.com> wrote:
> This has been bothering me all week. The code below works fine on my
> normal results.html page.
> 
> [more-list]
> <BLOCKQUOTE>
> Matches [matches] of [match-count] found<br>
> [calcn]
> 	my $number = ([match-count] / 12);
> 	my $rounded = sprintf("%.0f", $number);
> 	$Tag->tmp(rounded => $rounded);
> 	return;
> [/calcn]
> [loop list="1..[scratch rounded]" ranges=1]
> [page
> 	href="[scratch this_page]/[calcn] 12 * ([loop-code] - 1) [/calcn]"
> 	form="[if cgi a]a=[cgi a][/if]"
> ][loop-code]</a>
> [/loop]
> </BLOCKQUOTE>
> [/more-list]
> 
> However, I recently created another results page called brand_results.html
> and copied the same code but if you look at an example output page
> http://www.aftermarketcellular.com/ic/brand/JABRA.html the output is:
> 
> Matches 1-12 of 39 found
> 1 2 3
> 
> I am missing (3) of the results. Any ideas on what is preventing the
> remaining results to not be displayed?
> 
My guess is that you are taking 39/12=3.25 and rounding it to 3.
3*12=36.  39-36 leaves you with 3 missing items, which should be on
page 4.

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin at cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/


More information about the interchange-users mailing list