Re: CFLOOP help

2007-05-23 Thread Robertson-Ravo, Neil (RX)
Yep, been a bug in ColdFusion for as long as I can remember... Never fixed!
:-)




This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant,
Richmond, Surrey, TW9 1DN, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions. 
Visit our website at http://www.reedexpo.com

-Original Message-
From: Christopher Chin
To: CF-Talk
Sent: Tue May 22 23:17:44 2007
Subject: Re: CFLOOP help

THANK YOU JOSH!!! Ben's blog solved my issue.  Looks like a solid bug in
CFLOOP to me.

I needed to do this to my inner loop:

cfif distinctBuilding[building][distinctBuilding.CurrentRow] EQ
empResult.building

I love this site :)

--Chris

Could this be the old nested loop issue?  You have to set a local var to be

equal to the current row of the outer loop.  Then you use the local var in 
the inner loop.

cfloop query=outer
cfset whatever = outer.whatever
cfloop query=inner
#whatever#
/cfloop
/cfloop

Ben Nadel has a blog entry about this.

-- Josh


- Original Message - 
From: Christopher Chin [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Tuesday, May 22, 2007 2:01 PM
Subject: CFLOOP help






~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278933
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFLOOP help

2007-05-23 Thread Andrew Scott
Except I reported it as a bug in 3.0 days, when it was introduced or was it
2.0 days?

The answer I was given, its deliberate:-(




On 5/23/07, Robertson-Ravo, Neil (RX) [EMAIL PROTECTED]
wrote:

 Yep, been a bug in ColdFusion for as long as I can remember... Never
 fixed!
 :-)




 This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant,
 Richmond, Surrey, TW9 1DN, United Kingdom), a division of Reed Business,
 Registered in England, Number 678540.  It contains information which is
 confidential and may also be privileged.  It is for the exclusive use of
 the
 intended recipient(s).  If you are not the intended recipient(s) please
 note
 that any form of distribution, copying or use of this communication or the
 information in it is strictly prohibited and may be unlawful.  If you have
 received this communication in error please return it to the sender or
 call
 our switchboard on +44 (0) 20 89107910.  The opinions expressed within
 this
 communication are not necessarily those expressed by Reed Exhibitions.
 Visit our website at http://www.reedexpo.com

 -Original Message-
 From: Christopher Chin
 To: CF-Talk
 Sent: Tue May 22 23:17:44 2007
 Subject: Re: CFLOOP help

 THANK YOU JOSH!!! Ben's blog solved my issue.  Looks like a solid bug in
 CFLOOP to me.

 I needed to do this to my inner loop:

 cfif distinctBuilding[building][distinctBuilding.CurrentRow] EQ
 empResult.building

 I love this site :)

 --Chris

 Could this be the old nested loop issue?  You have to set a local var to
 be

 equal to the current row of the outer loop.  Then you use the local var
 in
 the inner loop.
 
 cfloop query=outer
 cfset whatever = outer.whatever
 cfloop query=inner
 #whatever#
 /cfloop
 /cfloop
 
 Ben Nadel has a blog entry about this.
 
 -- Josh
 
 
 - Original Message -
 From: Christopher Chin [EMAIL PROTECTED]
 To: CF-Talk cf-talk@houseoffusion.com
 Sent: Tuesday, May 22, 2007 2:01 PM
 Subject: CFLOOP help
 
 
 



 

~|
Create Web Applications With ColdFusion MX7  Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278956
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


CFLOOP help

2007-05-22 Thread Christopher Chin
I have this cfloop issue that is driving me bananas...I'm trying to create a 
tree menu for one of my apps.

Supposed to look like this:

Building: X
(list of employees seated in this building)

Not seated:
(employees not seated anywhere)

Since there's going to be a varying amount of buildings I select all the 
employees from a search criteria, and then do a query of a query to get the 
distince buildings within this search result.  MY ISSUE: I'm missing data for 
building 1500.  Seems as if the 2nd iteration through the outer loop isn't 
advancing the currentRow.  Hopefully someone can see where I'm going wrong 
here.  

See CFDUMP of my queries here:
http://www.christopherchin.com/empresult.jpg
First dump is the actual query results.  Second dump is a query of a query to 
get the distinct building numbers.

This is my output:
=
Building: 160
Brian Malone

Building: 1500
Brian Malone

Not Mapped:
Alison Greenberg
Amrita Sohal
Ashley Brochstein
Chris McBain
David Djanikian
Eric Toner
John Quevedo
Katie Tarulli
Martha Ohara
Matthew Elkins
Maureen Haskell

Here's my code:
cfloop query=distinctBuilding startrow=1 
endrow=#distinctBuilding.recordCount#
cfif #distinctBuilding.building# NEQ 
Building: #distinctBuilding.building#br /
cfloop query=empResult
cfif #trim(empResult.building)# EQ 
#trim(distinctBuilding.building)#
#empResult.fname# #empResult.lname#br /
/cfif
/cfloop
cfelse
Not Mapped:br /
cfloop query=empResult
cfif #empResult.building# EQ 
#empResult.fname# #empResult.lname#br /
/cfif
/cfloop
/cfif
br /
/cfloop

Thanx!
Chris

~|
ColdFusion MX7 and Flex 2 
Build sales  marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278919
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFLOOP help

2007-05-22 Thread Andrew Scott
I am assuming that the undefined building means not seated?

Now here is the trick your missing

Make sure you're query is sorted by building and then what ever something
like

order by Building,fName in your query.

Then insteado of using cfloop, use cfoutput like this

cfoutput query=queryName group=building
 cfif queryName.Building neq 
 Building: #queryName.Building#
 cfoutput
 #fName# #lName#
 /cfoutput
 br
 /cfif
/cfoutput

Now I am not sure how the undefined string will be sorted with this, but you
could run this twice one with is numeric around the output and one if its
null...

And why do people insist on learning CF with this?
  cfif #distinctBuilding.building# NEQ 

instead of
  cfif distinctBuilding.building neq 

Who is teaching you that?



On 5/23/07, Christopher Chin [EMAIL PROTECTED] wrote:

 I have this cfloop issue that is driving me bananas...I'm trying to create
 a tree menu for one of my apps.

 Supposed to look like this:

 Building: X
 (list of employees seated in this building)

 Not seated:
 (employees not seated anywhere)

 Since there's going to be a varying amount of buildings I select all the
 employees from a search criteria, and then do a query of a query to get the
 distince buildings within this search result.  MY ISSUE: I'm missing data
 for building 1500.  Seems as if the 2nd iteration through the outer loop
 isn't advancing the currentRow.  Hopefully someone can see where I'm going
 wrong here.

 See CFDUMP of my queries here:
 http://www.christopherchin.com/empresult.jpg
 First dump is the actual query results.  Second dump is a query of a query
 to get the distinct building numbers.

 This is my output:
 =
 Building: 160
 Brian Malone

 Building: 1500
 Brian Malone

 Not Mapped:
 Alison Greenberg
 Amrita Sohal
 Ashley Brochstein
 Chris McBain
 David Djanikian
 Eric Toner
 John Quevedo
 Katie Tarulli
 Martha Ohara
 Matthew Elkins
 Maureen Haskell

 Here's my code:
 cfloop query=distinctBuilding startrow=1
 endrow=#distinctBuilding.recordCount#
cfif #distinctBuilding.building# NEQ 
Building: #distinctBuilding.building#br /
cfloop query=empResult
cfif #trim(empResult.building)# EQ #trim(
 distinctBuilding.building)#
#empResult.fname# #empResult.lname#br /
/cfif
/cfloop
cfelse
Not Mapped:br /
cfloop query=empResult
cfif #empResult.building# EQ 
#empResult.fname# #empResult.lname#br /
/cfif
/cfloop
/cfif
 br /
 /cfloop

 Thanx!
 Chris

 

~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278920
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFLOOP help

2007-05-22 Thread Christopher Chin
Hi andrew,

Here's my query to get the distinct buildings:
cfquery name=distinctBuildings dbtype=query
select distinct(building) from empResult order by building desc
/cfquery

I have the whole page surrounded by a CFOUTPUT so i have to use a CFLOOP to 
ouput the queries.

cfif distinctBuilding.building neq   -- i'll change accordingly.  old 
habit..don't know how i got it.

thanx.

I am assuming that the undefined building means not seated?

Now here is the trick your missing

Make sure you're query is sorted by building and then what ever something
like

order by Building,fName in your query.

Then insteado of using cfloop, use cfoutput like this

cfoutput query=queryName group=building
 cfif queryName.Building neq 
 Building: #queryName.Building#
 cfoutput
 #fName# #lName#
 /cfoutput
 br
 /cfif
/cfoutput

Now I am not sure how the undefined string will be sorted with this, but you
could run this twice one with is numeric around the output and one if its
null...

And why do people insist on learning CF with this?
  cfif #distinctBuilding.building# NEQ 

instead of
  cfif distinctBuilding.building neq 

Who is teaching you that?



On 5/23/07, Christopher Chin [EMAIL PROTECTED] wrote:


~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade  see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278921
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFLOOP help

2007-05-22 Thread Andrew Scott
Ok, then if your not prepared to move your cfoutputs around then your only
option is to mimic the cfoutput query..

So with your second query, you can then loop through that do another QoQ to
get the new dat based on the building now I am not 100% sure but the method
I just mentioned I think will be slower than using the cfoutput, so if you
need to optimise this because of high usage on the site you will need to
keep that in mind.

But I haven't run a testcase, so I am only assuming that running a QoQ for
every building will be slower.



On 5/23/07, Christopher Chin [EMAIL PROTECTED] wrote:

 Hi andrew,

 Here's my query to get the distinct buildings:
 cfquery name=distinctBuildings dbtype=query
 select distinct(building) from empResult order by building desc
 /cfquery

 I have the whole page surrounded by a CFOUTPUT so i have to use a CFLOOP
 to ouput the queries.

 cfif distinctBuilding.building neq   -- i'll change
 accordingly.  old habit..don't know how i got it.

 thanx.



~|
Create Web Applications With ColdFusion MX7  Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278922
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFLOOP help

2007-05-22 Thread Josh Nathanson
Could this be the old nested loop issue?  You have to set a local var to be 
equal to the current row of the outer loop.  Then you use the local var in 
the inner loop.

cfloop query=outer
cfset whatever = outer.whatever
cfloop query=inner
#whatever#
/cfloop
/cfloop

Ben Nadel has a blog entry about this.

-- Josh


- Original Message - 
From: Christopher Chin [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Tuesday, May 22, 2007 2:01 PM
Subject: CFLOOP help


I have this cfloop issue that is driving me bananas...I'm trying to create 
a tree menu for one of my apps.

 Supposed to look like this:

 Building: X
 (list of employees seated in this building)

 Not seated:
 (employees not seated anywhere)

 Since there's going to be a varying amount of buildings I select all the 
 employees from a search criteria, and then do a query of a query to get 
 the distince buildings within this search result.  MY ISSUE: I'm missing 
 data for building 1500.  Seems as if the 2nd iteration through the outer 
 loop isn't advancing the currentRow.  Hopefully someone can see where I'm 
 going wrong here.

 See CFDUMP of my queries here:
 http://www.christopherchin.com/empresult.jpg
 First dump is the actual query results.  Second dump is a query of a query 
 to get the distinct building numbers.

 This is my output:
 =
 Building: 160
 Brian Malone

 Building: 1500
 Brian Malone

 Not Mapped:
 Alison Greenberg
 Amrita Sohal
 Ashley Brochstein
 Chris McBain
 David Djanikian
 Eric Toner
 John Quevedo
 Katie Tarulli
 Martha Ohara
 Matthew Elkins
 Maureen Haskell

 Here's my code:
 cfloop query=distinctBuilding startrow=1 
 endrow=#distinctBuilding.recordCount#
 cfif #distinctBuilding.building# NEQ 
 Building: #distinctBuilding.building#br /
 cfloop query=empResult
 cfif #trim(empResult.building)# EQ #trim(distinctBuilding.building)#
 #empResult.fname# #empResult.lname#br /
 /cfif
 /cfloop
 cfelse
 Not Mapped:br /
 cfloop query=empResult
 cfif #empResult.building# EQ 
 #empResult.fname# #empResult.lname#br /
 /cfif
 /cfloop
 /cfif
 br /
 /cfloop

 Thanx!
 Chris

 

~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278923
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFLOOP help

2007-05-22 Thread Christopher Chin
THANK YOU JOSH!!! Ben's blog solved my issue.  Looks like a solid bug in CFLOOP 
to me.

I needed to do this to my inner loop:

cfif distinctBuilding[building][distinctBuilding.CurrentRow] EQ 
empResult.building

I love this site :)

--Chris

Could this be the old nested loop issue?  You have to set a local var to be 
equal to the current row of the outer loop.  Then you use the local var in 
the inner loop.

cfloop query=outer
cfset whatever = outer.whatever
cfloop query=inner
#whatever#
/cfloop
/cfloop

Ben Nadel has a blog entry about this.

-- Josh


- Original Message - 
From: Christopher Chin [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Tuesday, May 22, 2007 2:01 PM
Subject: CFLOOP help




~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278924
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


cfloop help!

2001-05-04 Thread Diana Nichols

I must be blind today - I've used cfloops like this many timesbut the
output is wrong#@!$@#!^%$

I've reduced the code to see what was happening, and the value of the userID
the getusers query is not updating with each iteration of the outputin
other words, this code:

cfquery name=getusers datasource=#dsn#
select userID
from users
where companyID = 1
/cfquery
cfquery name=getm datasource=#dsn2#
select userID
from billing
where companyID = 1
/cfquery
table

cfoutput query=getusers
#getusers.userID# cfloop query=getm(#getusers.userID#,#getm.userID#)
/cfloopp
/cfoutput

produces this output:

1 (1,1) (1,4) (1,19) (1,22) (1,23)

4 (1,1) (1,4) (1,19) (1,22) (1,23)

19 (1,1) (1,4) (1,19) (1,22) (1,23)

22 (1,1) (1,4) (1,19) (1,22) (1,23)

23 (1,1) (1,4) (1,19) (1,22) (1,23)

I don't have a clue what I've done wronghelp, please!

TIA!
D

*
Diana Nichols
Webmistress
http://www.lavenderthreads.com
770.434.7374

One man's magic is another man's engineering. ---Lazarus Long


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: cfloop help!

2001-05-04 Thread Todd Ashworth

get rid of getusers in getusers.userID

cfoutput query=getusers
#getusers.userID# cfloop query=getm(#userID#,#getm.userID#)
/cfloopp
/cfoutput

Todd

- Original Message -
From: Diana Nichols [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Friday, May 04, 2001 3:34 PM
Subject: cfloop help!


| I must be blind today - I've used cfloops like this many timesbut the
| output is wrong#@!$@#!^%$
|
| I've reduced the code to see what was happening, and the value of the
userID
| the getusers query is not updating with each iteration of the outputin
| other words, this code:
|
| cfquery name=getusers datasource=#dsn#
| select userID
| from users
| where companyID = 1
| /cfquery
| cfquery name=getm datasource=#dsn2#
| select userID
| from billing
| where companyID = 1
| /cfquery
| table
|
| cfoutput query=getusers
| #getusers.userID# cfloop query=getm(#getusers.userID#,#getm.userID#)
| /cfloopp
| /cfoutput
|
| produces this output:
|
| 1 (1,1) (1,4) (1,19) (1,22) (1,23)
|
| 4 (1,1) (1,4) (1,19) (1,22) (1,23)
|
| 19 (1,1) (1,4) (1,19) (1,22) (1,23)
|
| 22 (1,1) (1,4) (1,19) (1,22) (1,23)
|
| 23 (1,1) (1,4) (1,19) (1,22) (1,23)
|
| I don't have a clue what I've done wronghelp, please!
|
| TIA!
| D
|
| *
| Diana Nichols
| Webmistress
| http://www.lavenderthreads.com
| 770.434.7374
|
| One man's magic is another man's engineering. ---Lazarus Long
|
|
|
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cfloop help!

2001-05-04 Thread Semrau, Steven L Mr SRA

Change

cfoutput query=getusers

To

cfloop query=getusers



Steven Semrau
SRA International, Inc.
Senior Member, Professional Staff
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Com:  (703) 805-1095
DSN:  (703) 655-1095


-Original Message-
From: Diana Nichols [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 04, 2001 3:34 PM
To: CF-Talk
Subject: cfloop help!


I must be blind today - I've used cfloops like this many timesbut the
output is wrong#@!$@#!^%$

I've reduced the code to see what was happening, and the value of the userID
the getusers query is not updating with each iteration of the outputin
other words, this code:

cfquery name=getusers datasource=#dsn#
select userID
from users
where companyID = 1
/cfquery
cfquery name=getm datasource=#dsn2#
select userID
from billing
where companyID = 1
/cfquery
table

cfoutput query=getusers
#getusers.userID# cfloop
query=getm(#getusers.userID#,#getm.userID#)
/cfloopp
/cfoutput

produces this output:

1 (1,1) (1,4) (1,19) (1,22) (1,23)

4 (1,1) (1,4) (1,19) (1,22) (1,23)

19 (1,1) (1,4) (1,19) (1,22) (1,23)

22 (1,1) (1,4) (1,19) (1,22) (1,23)

23 (1,1) (1,4) (1,19) (1,22) (1,23)

I don't have a clue what I've done wronghelp, please!

TIA!
D

*
Diana Nichols
Webmistress
http://www.lavenderthreads.com
770.434.7374

One man's magic is another man's engineering. ---Lazarus Long
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: cfloop help!

2001-05-04 Thread Clint Tredway

The results that you are getting is correct to the code you showed us. Can you tell us 
what you are 'trying' to get and maybe we can help.

Thanks,

Clint

-- Original Message --
From: Diana Nichols [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
Date: Fri, 04 May 2001 15:34:14 -0400

I must be blind today - I've used cfloops like this many timesbut the
output is wrong#@!$@#!^%$

I've reduced the code to see what was happening, and the value of the userID
the getusers query is not updating with each iteration of the outputin
other words, this code:

cfquery name=getusers datasource=#dsn#
select userID
from users
where companyID = 1
/cfquery
cfquery name=getm datasource=#dsn2#
select userID
from billing
where companyID = 1
/cfquery
table

cfoutput query=getusers
#getusers.userID# cfloop query=getm(#getusers.userID#,#getm.userID#)
/cfloopp
/cfoutput

produces this output:

1 (1,1) (1,4) (1,19) (1,22) (1,23)

4 (1,1) (1,4) (1,19) (1,22) (1,23)

19 (1,1) (1,4) (1,19) (1,22) (1,23)

22 (1,1) (1,4) (1,19) (1,22) (1,23)

23 (1,1) (1,4) (1,19) (1,22) (1,23)

I don't have a clue what I've done wronghelp, please!

TIA!
D

*
Diana Nichols
Webmistress
http://www.lavenderthreads.com
770.434.7374

One man's magic is another man's engineering. ---Lazarus Long
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cfloop help!

2001-05-04 Thread Diana Nichols

That did the trick...the output straitened up...but now I'm back to where I
started, which was adding a cfif qualifier

cfoutput query=getusers
#getusers.userID# cfloop query=getmcfif userID is
getm.userID(#userID#,#getm.userID#)/cfif/cfloopp
/cfoutput

and its still outputting all:

1 (1,1)(4,4)(19,19)(22,22)(23,23)

4 (1,1)(4,4)(19,19)(22,22)(23,23)

19 (1,1)(4,4)(19,19)(22,22)(23,23)

22 (1,1)(4,4)(19,19)(22,22)(23,23)

23 (1,1)(4,4)(19,19)(22,22)(23,23)

I also tried selecting getusers.userID as thisuser, but when it gets to
the cfif it throws an Error Resolving Parameter on THISUSER.

yikes.

D

-Original Message-
From: Todd Ashworth [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 04, 2001 3:56 PM
To: CF-Talk
Subject: Re: cfloop help!


get rid of getusers in getusers.userID

cfoutput query=getusers
#getusers.userID# cfloop query=getm(#userID#,#getm.userID#)
/cfloopp
/cfoutput

Todd

- Original Message -
From: Diana Nichols [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Friday, May 04, 2001 3:34 PM
Subject: cfloop help!


| I must be blind today - I've used cfloops like this many timesbut the
| output is wrong#@!$@#!^%$
|
| I've reduced the code to see what was happening, and the value of the
userID
| the getusers query is not updating with each iteration of the outputin
| other words, this code:
|
| cfquery name=getusers datasource=#dsn#
| select userID
| from users
| where companyID = 1
| /cfquery
| cfquery name=getm datasource=#dsn2#
| select userID
| from billing
| where companyID = 1
| /cfquery
| table
|
| cfoutput query=getusers
| #getusers.userID# cfloop query=getm(#getusers.userID#,#getm.userID#)
| /cfloopp
| /cfoutput
|
| produces this output:
|
| 1 (1,1) (1,4) (1,19) (1,22) (1,23)
|
| 4 (1,1) (1,4) (1,19) (1,22) (1,23)
|
| 19 (1,1) (1,4) (1,19) (1,22) (1,23)
|
| 22 (1,1) (1,4) (1,19) (1,22) (1,23)
|
| 23 (1,1) (1,4) (1,19) (1,22) (1,23)
|
| I don't have a clue what I've done wronghelp, please!
|
| TIA!
| D
|
| *
| Diana Nichols
| Webmistress
| http://www.lavenderthreads.com
| 770.434.7374
|
| One man's magic is another man's engineering. ---Lazarus Long
|
|
|
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cfloop help!

2001-05-04 Thread Diana Nichols

originally, I was trying to print out info only if the two userID's
matchsee the response I posted a few minutes ago.

(and thanks for your response!)
D

-Original Message-
From: Clint Tredway [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 04, 2001 3:58 PM
To: CF-Talk
Subject: Re: cfloop help!


The results that you are getting is correct to the code you showed us. Can
you tell us what you are 'trying' to get and maybe we can help.

Thanks,

Clint

-- Original Message --
From: Diana Nichols [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
Date: Fri, 04 May 2001 15:34:14 -0400

I must be blind today - I've used cfloops like this many timesbut the
output is wrong#@!$@#!^%$

I've reduced the code to see what was happening, and the value of the userID
the getusers query is not updating with each iteration of the outputin
other words, this code:

cfquery name=getusers datasource=#dsn#
select userID
from users
where companyID = 1
/cfquery
cfquery name=getm datasource=#dsn2#
select userID
from billing
where companyID = 1
/cfquery
table

cfoutput query=getusers
#getusers.userID# cfloop query=getm(#getusers.userID#,#getm.userID#)
/cfloopp
/cfoutput

produces this output:

1 (1,1) (1,4) (1,19) (1,22) (1,23)

4 (1,1) (1,4) (1,19) (1,22) (1,23)

19 (1,1) (1,4) (1,19) (1,22) (1,23)

22 (1,1) (1,4) (1,19) (1,22) (1,23)

23 (1,1) (1,4) (1,19) (1,22) (1,23)

I don't have a clue what I've done wronghelp, please!

TIA!
D

*
Diana Nichols
Webmistress
http://www.lavenderthreads.com
770.434.7374

One man's magic is another man's engineering. ---Lazarus Long
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cfloop help! -- solved!!

2001-05-04 Thread Diana Nichols

It's no elegant, and I'm sure there's a better way, but I finally go what I
wanted by setting another variable:

cfoutput query=getuserscfset thisuser=userID
#userID# cfloop query=getmcfif thisuser is
getm.userID(#thisuser#,#getm.userID#)/cfif/cfloopp
/cfoutput

Thanks everyone for your help!
D
*
Diana Nichols
Webmistress
http://www.lavenderthreads.com
770.434.7374

One man's magic is another man's engineering. ---Lazarus Long

-Original Message-
From: Diana Nichols [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 04, 2001 4:08 PM
To: CF-Talk
Subject: RE: cfloop help!


That did the trick...the output straitened up...but now I'm back to where I
started, which was adding a cfif qualifier

cfoutput query=getusers
#getusers.userID# cfloop query=getmcfif userID is
getm.userID(#userID#,#getm.userID#)/cfif/cfloopp
/cfoutput

and its still outputting all:

1 (1,1)(4,4)(19,19)(22,22)(23,23)

4 (1,1)(4,4)(19,19)(22,22)(23,23)

19 (1,1)(4,4)(19,19)(22,22)(23,23)

22 (1,1)(4,4)(19,19)(22,22)(23,23)

23 (1,1)(4,4)(19,19)(22,22)(23,23)

I also tried selecting getusers.userID as thisuser, but when it gets to
the cfif it throws an Error Resolving Parameter on THISUSER.

yikes.

D

-Original Message-
From: Todd Ashworth [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 04, 2001 3:56 PM
To: CF-Talk
Subject: Re: cfloop help!


get rid of getusers in getusers.userID

cfoutput query=getusers
#getusers.userID# cfloop query=getm(#userID#,#getm.userID#)
/cfloopp
/cfoutput

Todd

- Original Message -
From: Diana Nichols [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Friday, May 04, 2001 3:34 PM
Subject: cfloop help!


| I must be blind today - I've used cfloops like this many timesbut the
| output is wrong#@!$@#!^%$
|
| I've reduced the code to see what was happening, and the value of the
userID
| the getusers query is not updating with each iteration of the outputin
| other words, this code:
|
| cfquery name=getusers datasource=#dsn#
| select userID
| from users
| where companyID = 1
| /cfquery
| cfquery name=getm datasource=#dsn2#
| select userID
| from billing
| where companyID = 1
| /cfquery
| table
|
| cfoutput query=getusers
| #getusers.userID# cfloop query=getm(#getusers.userID#,#getm.userID#)
| /cfloopp
| /cfoutput
|
| produces this output:
|
| 1 (1,1) (1,4) (1,19) (1,22) (1,23)
|
| 4 (1,1) (1,4) (1,19) (1,22) (1,23)
|
| 19 (1,1) (1,4) (1,19) (1,22) (1,23)
|
| 22 (1,1) (1,4) (1,19) (1,22) (1,23)
|
| 23 (1,1) (1,4) (1,19) (1,22) (1,23)
|
| I don't have a clue what I've done wronghelp, please!
|
| TIA!
| D
|
| *
| Diana Nichols
| Webmistress
| http://www.lavenderthreads.com
| 770.434.7374
|
| One man's magic is another man's engineering. ---Lazarus Long
|
|
|
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cfloop help (new)

2000-12-20 Thread mikec

I beleive there is a tutorial for this on the www.cfvault.com  under tutorials

Mike Cartier
#code.monkey#


 ** Original Subject: RE: cfloop help (new)
 ** Original Sender: "Warrick, Mark" [EMAIL PROTECTED]
 ** Original Date: Tue, 19 Dec 2000 19:21:32 -0500

 ** Original Message follows... 


 Actually, I think what you need to read up on is how to "Browse Next N records".  In 
Ben Forta's ColdFusion Web Application Construction Kit (version 4.0) it takes Ben 
about 8 pages of text to describe how this works.  Does your book have that same 
tutorial?  Does anyone have a tutorial on the web for this?
 
 To summarize, what you need to do is pass the record staring points and maxrows 
counts between each search results view.  The counts are based upon the total number 
of records in the results set and the max number of records per page.
 
 ---mark
 --
 Mark Warrick
 Phone: (714) 547-5386
 Efax.com Fax: (801) 730-7289
 Personal Email: [EMAIL PROTECTED]
 Personal URL: http://www.warrick.net 
 Business Email: [EMAIL PROTECTED]
 Business URL: http://www.fusioneers.com
 ICQ: 346566
 --
 
 
  -Original Message-
  From: Jay Patton [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, December 19, 2000 1:54 PM
  To: CF-Talk
  Subject: cfloop help (new)
  
  
  Hello all,
  Im kinda new at the coldfusion stuff ive picked it up really fast 
  but im having a problem.
  i have over 200 images in two different categories, and i want to 
  display only 8 at a time so if i were to click on photos i would 
  want to see the first 8 photos in the database and then be able 
  to navigate back and fourth through the images displaying only 8 
  at a time. same with if i were to click on paintings as well. but 
  i honestly even after reading the entire chapter on looping in my 
  ColdFusion 4.5 book still dont quite understand how to make the 
  loop work. if anyone could help me out that would be great. Thanks
  
  -Jay Patton
  www.webpro-usa.com
  
  
 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



cfloop help (new)

2000-12-19 Thread Jay Patton

Hello all,
Im kinda new at the coldfusion stuff ive picked it up really fast but im having a 
problem.
i have over 200 images in two different categories, and i want to display only 8 at a 
time so if i were to click on photos i would want to see the first 8 photos in the 
database and then be able to navigate back and fourth through the images displaying 
only 8 at a time. same with if i were to click on paintings as well. but i honestly 
even after reading the entire chapter on looping in my ColdFusion 4.5 book still dont 
quite understand how to make the loop work. if anyone could help me out that would be 
great. Thanks

-Jay Patton
www.webpro-usa.com


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cfloop help (new)

2000-12-19 Thread cftalk


as you are using a database try something like

CFPARAM NAME="URL.StartRow" DEFAULT="1"

CFOUTPUT QUERY="query_name" STARTROW="#URL.StartRow#" MAXROWS="8"
#query_name.pic#
/CFOUTPUT

CFOUTPUT
A HREF="index.cfm?StartRow=#Evaluate(URL.StartRow + 8)#"Next 8/a
/CFOUTPUT

On your output page..

HTH Mike

-Original Message-
From: Jay Patton [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 19, 2000 21:54
To: CF-Talk
Subject: cfloop help (new)


Hello all,
Im kinda new at the coldfusion stuff ive picked it up really fast but im
having a problem.
i have over 200 images in two different categories, and i want to display
only 8 at a time so if i were to click on photos i would want to see the
first 8 photos in the database and then be able to navigate back and fourth
through the images displaying only 8 at a time. same with if i were to click
on paintings as well. but i honestly even after reading the entire chapter
on looping in my ColdFusion 4.5 book still dont quite understand how to make
the loop work. if anyone could help me out that would be great. Thanks

-Jay Patton
www.webpro-usa.com
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: cfloop help (new)

2000-12-19 Thread WebMaster


Get Ben Forta's Book "Cold Fusion Web Application Construction Kit".  It 
details EXACTLY how to do what you want (as well as tons of other things 
with CF).

You'll find it an invaluable reference.

Mike

At 02:53 PM 12/19/2000 -0700, you wrote:
Hello all,
Im kinda new at the coldfusion stuff ive picked it up really fast but im 
having a problem.
i have over 200 images in two different categories, and i want to display 
only 8 at a time so if i were to click on photos i would want to see the 
first 8 photos in the database and then be able to navigate back and 
fourth through the images displaying only 8 at a time. same with if i were 
to click on paintings as well. but i honestly even after reading the 
entire chapter on looping in my ColdFusion 4.5 book still dont quite 
understand how to make the loop work. if anyone could help me out that 
would be great. Thanks

-Jay Patton
www.webpro-usa.com



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cfloop help (new)

2000-12-19 Thread Warrick, Mark

Actually, I think what you need to read up on is how to "Browse Next N records".  In 
Ben Forta's ColdFusion Web Application Construction Kit (version 4.0) it takes Ben 
about 8 pages of text to describe how this works.  Does your book have that same 
tutorial?  Does anyone have a tutorial on the web for this?

To summarize, what you need to do is pass the record staring points and maxrows counts 
between each search results view.  The counts are based upon the total number of 
records in the results set and the max number of records per page.

---mark
--
Mark Warrick
Phone: (714) 547-5386
Efax.com Fax: (801) 730-7289
Personal Email: [EMAIL PROTECTED]
Personal URL: http://www.warrick.net 
Business Email: [EMAIL PROTECTED]
Business URL: http://www.fusioneers.com
ICQ: 346566
--


 -Original Message-
 From: Jay Patton [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 19, 2000 1:54 PM
 To: CF-Talk
 Subject: cfloop help (new)
 
 
 Hello all,
 Im kinda new at the coldfusion stuff ive picked it up really fast 
 but im having a problem.
 i have over 200 images in two different categories, and i want to 
 display only 8 at a time so if i were to click on photos i would 
 want to see the first 8 photos in the database and then be able 
 to navigate back and fourth through the images displaying only 8 
 at a time. same with if i were to click on paintings as well. but 
 i honestly even after reading the entire chapter on looping in my 
 ColdFusion 4.5 book still dont quite understand how to make the 
 loop work. if anyone could help me out that would be great. Thanks
 
 -Jay Patton
 www.webpro-usa.com
 
 

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists