ValueList() would work better for you here.
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/funca117.htm#wp11
14236
Mike
I'm using a query and loop to fill a body onLoad statement
for a _javascript_ image preload.
So far I've got:
body query=allphotos
startrow=1
body >
query=allphotos'photoslarge/#filenamelarge#'cfif
allphotos.recordcount NEQ allphotos.currentrow,/cfif/cfoutput)
Pascal
-Original Message-
From: Jeffrey Fongemie [mailto:[EMAIL PROTECTED]
Sent: 07 September 2004 16:55
To: CF-Talk
Subject: Looping Question
Hi everyone,
body >
query=allphotos'photoslarge/#filenamelarge#' cfifcurrentrow lt
allphotos.recordcount, /cfif /cfoutput)
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
rre, Michael [mailto:[EMAIL PROTECTED]
Sent: 07 September 2004 17:05
To: CF-Talk
Subject: RE: Looping Question
ValueList() would work better for you here.
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/funca117.htm#wp11
14236
Mike
I'm using a query and loop to fill a b
How's this play?
body >
query=allphotos'photoslarge/#filenamelarge#'cfif currentrow LT
allphotos.recordcount,/cfif/cfoutput)
Greg
- Original Message -
From: Jeffrey Fongemie [EMAIL PROTECTED]
Date: Tue, 7 Sep 2004 10:55:26 -0400
Subject: Looping Question
To: CF-Talk [EMAIL PROTECTED]
Hi
Good catch Pascal. Personally I am not a fan of cluttering up tags with
nested cftags inside them, so I'd go with the QuotedValueList() over the
conditional logic in the body tag.Just a preference thing.
Michael T. Tangorre
It would be QuotedValueList and this would only work if the
query was
On Tue, 7 Sep 2004 17:03:43 +0200, Pascal Peters wrote:
body >
query=allphotos'photoslarge/#filenamelarge#'cfif
allphotos.recordcount NEQ
allphotos.currentrow,/cfif/cfoutput)
Pascal
Perfect. Thanks!
makes perfect sense, and so simple.
-Jeff
[Todays Threads]
[This Message]
Use your loop to build the list with listappend() then just use the listname
in the preload
cfset images =
cfloop query=allphotos
cfset images = listappend(images, 'photoslarge/#filenamelarge#')
/cfloop
>
_
From: Jeffrey Fongemie [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September
try w/o the query name in your sql statement
i had to change a few loop/queries migrating from cf5 to cfmx ..
cfloop index=memberID from=1 to=#getRecords.recordcount#
cfquery name=updateRecords datasource=#REQUEST.dsnSQL#
username=#REQUEST.dsnUID# password=#REQUEST.dsnPWD#
UPDATE
Mark,
The problem is that your loop index (memberID) is changing, but nothing
about the query is.You are repeatedly referring to getRecords.memberID,
which, without a CFOUTPUT or CFLOOP tag, will always just give you the first
record.In fact, I am surprised that you are doing anything other
()?
Mark
_
From: Cornillon, Matthieu (Consultant)
[mailto:[EMAIL PROTECTED]
Sent: Thursday, September 02, 2004 1:58 PM
To: CF-Talk
Subject: RE: Looping Question
Mark,
The problem is that your loop index (memberID) is changing, but nothing
about the query is.You are repeatedly referring
This looks like it should work
.
It is looping the query versus from and to
I changed your query to only pick records that have dashes in them as well
!--- Get a count of the records prior to insertion ---
cfquery name=getRecordsdatasource=#REQUEST.dsnSQL#
username=#REQUEST.dsnUID#
-Original Message-
From: Mark Leder [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 02, 2004 2:20 PM
To: CF-Talk
Subject: RE: Looping Question
Thanks for your responses.
The query that Matt suggested works.
One problem however.CF chokes when there is a NULL value or an empty
field
I'm really tired and I'm about to go back to bed, so forgive the lack of
information in this message. I think you are looking for a SQL outer join
where (addresstype = 1 and address = ) or (addresstype = 2 and
address =
) or (addresstype = 3 and address = ). When I wake up I'll check
back
14 matches
Mail list logo