Re: Nested loop problems

2009-05-22 Thread Ryan Letulle

thx, nice post
--
Ryan



On Fri, May 22, 2009 at 4:44 PM, Ben Nadel  wrote:

>
> Ryan,
>
> To do that, you have to refer to the outer loop's explicit row:
>
>
> http://www.bennadel.com/blog/546-Referring-To-The-Proper-Row-Of-The-Outer-CFLoop-With-Nested-CFLoops-.htm
>
> This has been fixed in ColdFusion 8.
>
> -Ben
>
> --
> Ben Nadel
> Adobe Community Expert
> Adobe Certified Advanced ColdFusion Developer
> Manager New York ColdFusion User Group
> http://www.bennadel.com
>
> Need ColdFusion Help?
> http://www.bennadel.com/Ask-Ben
>
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322750
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Nested loop problems

2009-05-22 Thread Ben Nadel

Ryan,

To do that, you have to refer to the outer loop's explicit row:

http://www.bennadel.com/blog/546-Referring-To-The-Proper-Row-Of-The-Outer-CFLoop-With-Nested-CFLoops-.htm

This has been fixed in ColdFusion 8.

-Ben

-- 
Ben Nadel
Adobe Community Expert
Adobe Certified Advanced ColdFusion Developer
Manager New York ColdFusion User Group
http://www.bennadel.com

Need ColdFusion Help?
http://www.bennadel.com/Ask-Ben


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322749
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Nested loop problems

2009-05-22 Thread Ryan Letulle

Has anyone else seen problems with nested loops in CF7?
Outer 
---Inner 
Try to use a variable from the outer query here and it is empty.  I have to
cfset it to another variable before entering this cfloop and then it is good
2 go.
---Inner 
Outer 
--
Ryan


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322748
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: loop problems

2002-10-04 Thread Michael Conger

...use...
AND lookup.type_id IN (Select type_id from lookup where lookup.type =
'#form.steeltype#')
...instead of...
AND lookup.type_id = (Select type_id from lookup where lookup.type =
'#form.steeltype#')

-Michael Conger
[EMAIL PROTECTED]


- Original Message -
From: "Webmaster" <[EMAIL PROTECTED]>
Newsgroups: cf-talk
Sent: Friday, October 04, 2002 2:35 PM
Subject: loop problems


> This is the query I am running but because I have multiple entries going
in
> to this form that gets submitted. The bottom part of query does not work
> because it is a list how do I get it to look at each individual record and
> loop through for each one?
>
> 
> SELECT  Steel.width,
> Steel.weight,
> Steel.length,
> Steel.quantity,
> Steel.price,
> location.location,
> lookup.type,
> lookup2.type as smalltype,
> method.method,
> size_lookup.size_type
> FROMSteel,
> location,
> lookup,
> lookup2,
> method,
> size_lookup
> WHERE steel.type_id = lookup.type_id
> AND steel.typeid = lookup2.typeid
> AND steel.size_id = size_lookup.size_id
> AND steel.location_id = location.location_id
> AND steel.method_id = method.method_id
> AND lookup.type_id = (Select type_id from lookup where lookup.type =
> '#form.steeltype#')
> 
> 
>  fullcheckquery.smalltype) AND (form.width EQ fullcheckquery.width) AND
> (form.weight EQ fullcheckquery.weight) AND (form.length EQ
> fullcheckquery.length) AND (form.price EQ fullcheckquery.price) AND
> (form.location EQ fullcheckquery.location)>
> 
> SELECT steel.id,
> steel.quantity
> FROM Steel,
> lookup,
> lookup2,
> location
> WHERE steel.type_id = lookup.type_id
> AND steel.typeid = lookup2.typeid
> AND steel.location_id = location.location_id
> AND lookup.type_id = (Select type_id from lookup where lookup.type =
> '#form.steeltype#')
> AND lookup2.typeid = (Select typeid from lookup2 where lookup2.type =
> '#form.type#')
> AND Steel.width = '#form.width#'
> AND Steel.weight = '#form.weight#'
> AND Steel.length = '#form.length#'
> AND steel.price = '#form.price#'
> AND location.location_id = (Select location_id from location where
> location.location = '#form.location#')
> 
>
> 
>
> 
> UPDATE Steel
> SET quantity = #setquantity#
> WHERE steel.id = #update.id#
> 
> 
> This is a new entrie!
> 
> 
>
>
> 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com



RE: loop problems

2002-10-04 Thread Bryan Love

use IN instead of =


SELECT  Steel.width,
Steel.weight,
Steel.length,
Steel.quantity,
Steel.price,
location.location,
lookup.type,
lookup2.type as smalltype,
method.method,
size_lookup.size_type
FROMSteel,
location,
lookup,
lookup2,
method,
size_lookup
WHERE   steel.type_id = lookup.type_id
AND steel.typeid = lookup2.typeid
AND steel.size_id = size_lookup.size_id
AND steel.location_id = location.location_id
AND steel.method_id = method.method_id
AND lookup.type_id IN (Select type_id from lookup where
lookup.type =
'#form.steeltype#')


+---+
Bryan Love
  Macromedia Certified Professional
  Internet Application Developer
  Database Analyst
TeleCommunication Systems
[EMAIL PROTECTED]
+---+

"...'If there must be trouble, let it be in my day, that my child may have
peace'..."
- Thomas Paine, The American Crisis

"Let's Roll"
- Todd Beamer, Flight 93



-Original Message-
From: Webmaster [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 04, 2002 11:35 AM
To: CF-Talk
Subject: loop problems


This is the query I am running but because I have multiple entries going in
to this form that gets submitted. The bottom part of query does not work
because it is a list how do I get it to look at each individual record and
loop through for each one?


SELECT  Steel.width,
Steel.weight,
Steel.length,
Steel.quantity,
Steel.price,
location.location,
lookup.type,
lookup2.type as smalltype,
method.method,
size_lookup.size_type
FROMSteel,
location,
lookup,
lookup2,
method,
size_lookup
WHERE   steel.type_id = lookup.type_id
AND steel.typeid = lookup2.typeid
AND steel.size_id = size_lookup.size_id
AND steel.location_id = location.location_id
AND steel.method_id = method.method_id
AND lookup.type_id = (Select type_id from lookup where
lookup.type =
'#form.steeltype#')




SELECT  steel.id,
steel.quantity
FROMSteel,
lookup,
lookup2,
location
WHERE   steel.type_id = lookup.type_id
AND steel.typeid = lookup2.typeid
AND steel.location_id = location.location_id
AND lookup.type_id = (Select type_id from lookup where
lookup.type =
'#form.steeltype#')
AND lookup2.typeid = (Select typeid from lookup2 where
lookup2.type =
'#form.type#')
AND Steel.width = '#form.width#'
AND Steel.weight = '#form.weight#'
AND Steel.length = '#form.length#'
AND steel.price = '#form.price#'
AND location.location_id = (Select location_id from location
where
location.location = '#form.location#')





UPDATE Steel
SET quantity = #setquantity#
WHERE steel.id = #update.id#


This is a new entrie!





~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



loop problems

2002-10-04 Thread Webmaster

This is the query I am running but because I have multiple entries going in
to this form that gets submitted. The bottom part of query does not work
because it is a list how do I get it to look at each individual record and
loop through for each one?


SELECT  Steel.width,
Steel.weight,
Steel.length,
Steel.quantity,
Steel.price,
location.location,
lookup.type,
lookup2.type as smalltype,
method.method,
size_lookup.size_type
FROMSteel,
location,
lookup,
lookup2,
method,
size_lookup
WHERE   steel.type_id = lookup.type_id
AND steel.typeid = lookup2.typeid
AND steel.size_id = size_lookup.size_id
AND steel.location_id = location.location_id
AND steel.method_id = method.method_id
AND lookup.type_id = (Select type_id from lookup where lookup.type 
=
'#form.steeltype#')




SELECT  steel.id,
steel.quantity
FROMSteel,
lookup,
lookup2,
location
WHERE   steel.type_id = lookup.type_id
AND steel.typeid = lookup2.typeid
AND steel.location_id = location.location_id
AND lookup.type_id = (Select type_id from lookup where lookup.type =
'#form.steeltype#')
AND lookup2.typeid = (Select typeid from lookup2 where lookup2.type =
'#form.type#')
AND Steel.width = '#form.width#'
AND Steel.weight = '#form.weight#'
AND Steel.length = '#form.length#'
AND steel.price = '#form.price#'
AND location.location_id = (Select location_id from location where
location.location = '#form.location#')





UPDATE Steel
SET quantity = #setquantity#
WHERE steel.id = #update.id#


This is a new entrie!




~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm