Re: inserting a structure...within a structure...within a structure

2008-11-12 Thread Ben Conner
Thanks for all the replies. I got much more out of it than the original question. Much appreciated! --Ben -- Ben Conner[EMAIL PROTECTED] Web World, Inc. 888-206-6486 PO Box 1122 480-704-2000 Queen Creek, AZ 85242

Re: inserting a structure...within a structure...within a structure

2008-11-11 Thread Jason Fisher
A little OT, but you can save some keystrokes with proper use of the '#' symbol. Safer to lose the internal reference to the query inside the loop, too: cfquery name=cats datasource=#Application.DSN# snip .. /cfquery cfloop query=cats cfif NOT StructKeyExists(allcats, category)

RE: inserting a structure...within a structure...within a structure

2008-11-11 Thread Dave Francis
:[EMAIL PROTECTED] Sent: Tuesday, November 11, 2008 9:02 AM To: cf-talk Subject: Re: inserting a structure...within a structure...within a structure 1) Main thing is that you don't need it, because you're already in the query 'scope' inside a CFOUTPUT or CFLOOP 2) If you do a cfoutput#cats.category

RE: inserting a structure...within a structure...within a structure

2008-11-11 Thread Adrian Lynch
Yup, that's the case. Adrian -Original Message- From: Dave Francis Sent: 11 November 2008 14:24 To: cf-talk Subject: RE: inserting a structure...within a structure...within a structure Just to clarify ... Are you saying that within a CFOUTPUT or CFLOOP, CF changes its order

RE: inserting a structure...within a structure...within a structure

2008-11-11 Thread Jason Fisher
Subject: RE: inserting a structure...within a structure...within a structure Just to clarify ... Are you saying that within a CFOUTPUT or CFLOOP, CF changes its order of precedence and looks for query. scoped variables first? ie. #x# will give abc.x rather than the local variable x

RE: inserting a structure...within a structure...within a structure

2008-11-11 Thread Jason Fisher
@houseoffusion.com Subject: RE: inserting a structure...within a structure...within a structure I've never seen myQuery.myColumn inside a query loop not return what it should. Got some sample code? I know there was a bug a while ago (might still be with us) with nested loops and having to set a variable

Re: inserting a structure...within a structure...within a structure

2008-11-11 Thread Peter Boughton
I've never seen myQuery.myColumn inside a query loop not return what it should. Got some sample code? Below is some sample code - it shows the problem with CF7 (haven't tested it with anything else). Note, as you will see, this bug(?) means that with nested queries you should *fully* scope the

Re: inserting a structure...within a structure...within a structure

2008-11-11 Thread Azadi Saryev
always understood it. CF does not go digging through variables, form, url, etc first when inside a query loop. From: Dave Francis [EMAIL PROTECTED] Sent: Tuesday, November 11, 2008 9:24 AM To: cf-talk cf-talk@houseoffusion.com Subject: RE: inserting

Re: inserting a structure...within a structure...within a structure

2008-11-11 Thread Jason Fisher
1) Main thing is that you don't need it, because you're already in the query 'scope' inside a CFOUTPUT or CFLOOP 2) If you do a cfoutput#cats.category#/cfoutput on its own, it pulls the first record, as though it were cats.category[1]. By putting cfoutput query=cats#cats.category#/cfoutput

RE: inserting a structure...within a structure...within a structure

2008-11-11 Thread Gaulin, Mark
PROTECTED] Sent: Tuesday, November 11, 2008 8:38 AM To: cf-talk Subject: Re: inserting a structure...within a structure...within a structure A little OT, but you can save some keystrokes with proper use of the '#' symbol. Safer to lose the internal reference to the query inside the loop, too

RE: inserting a structure...within a structure...within a structure

2008-11-11 Thread Adrian Lynch
Why safer to lose the query ref? Adrian -Original Message- From: Jason Fisher [mailto:[EMAIL PROTECTED] Sent: 11 November 2008 13:38 To: cf-talk Subject: Re: inserting a structure...within a structure...within a structure A little OT, but you can save some keystrokes with proper use

RE: inserting a structure...within a structure...within a structure

2008-11-11 Thread Adrian Lynch
. Adrian -Original Message- From: Jason Fisher Sent: 11 November 2008 14:02 To: cf-talk Subject: Re: inserting a structure...within a structure...within a structure 1) Main thing is that you don't need it, because you're already in the query 'scope' inside a CFOUTPUT or CFLOOP 2) If you do

Re: inserting a structure...within a structure...within a structure

2008-11-10 Thread Kym Kovan
Hi Ben, you can shorten it down a bit and go as many levels deep as you want. Like this: cfquery name=cats datasource=#Application.DSN# ... snip .. /cfquery cfloop query=cats cfif NOT StructKeyExists(allcats, #cats.category#) cfset allcats[#cats.category#] = StructNew() cfset