-Original Message-
From: Stuart Kidd [mailto:[EMAIL PROTECTED]
Sent: donderdag 11 maart 2004 12:45
To: CF-Talk
Subject: Loops in Loops (let's go loopy)
Hi guys,
is it possible to put a cfloop inside a cfloop?
Yes
Maybe there's a easier way to do this but basically, like on
is there an easier way?
I usually do that by having a couple of variables:
page - the current page you're on (from URL)
pagesize - the number of items on a page (hardcode/from URL)
recordcount - the total number of results (from your query)
You can then work out things like the total number of
In case i didn't make myself too clear,
what i'm really needing is 2 counters in the same loop, one which goes in steps of 10 and the other in steps of 1.
-- Original Message --
From: Stuart Kidd [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
Date:Thu, 11
mailto:[EMAIL PROTECTED]
Sent: 11 March 2004 11:49
To: CF-Talk
Subject: RE: Loops in Loops (let's go loopy)
is there an easier way?
I usually do that by having a couple of variables:
page - the current page you're on (from URL) pagesize - the
number of items on a page (hard
Thanks Tim and Pascal,
That's the trick... before the replies came i was kind of getting the hang of it but my maths was all wrong i had (i/10)-1 but i can see it now.
-- Original Message --
From: Tim Blair [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
Engage brain, then type...
cfset startresults = (url.page * pagesize) + 1
Of course, if you use page=1, you'll start at result 11 which is
wrong... Try:
cfset startresults = (url.page * pagesize) - pagesize + 1
Sorry about that.
Tim.
---
: 11 March 2004 12:04
To: CF-Talk
Subject: RE: Loops in Loops (let's go loopy)
Thanks Tim and Pascal,
That's the trick... before the replies came i was kind of getting the hang
of it but my maths was all wrong i had (i/10)-1 but i can see it now.
-- Original Message
Stuart,
I made a custom tag a while back that did just this. Check out
http://www.cornfeed.com/index.cfm?p=productsn=cfpagelist for a quick demo
and a free download.
Cedric Villat
Subject: Loops in Loops (let's go loopy)
From: Stuart Kidd [EMAIL PROTECTED]
Date: Thu, 11 Mar 2004 06:44:51
8 matches
Mail list logo