House of Fusion
Home of the ColdFusion Community
Hostmysite VPS Hosting

Search cf-talk

September 07, 2008

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
   1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30         

Subscribe Now
Fusion Authority Quarterly Update - ColdFusion 8 Special Edition

For ColdFusion hosting try HostMySite.com.
Search over 2,500 ColdFusion resources here  >>>      
Home /  Groups /  ColdFusion Talk (CF-Talk)

defining variables in a new loop from an old loop

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
#evaluate('Songs#k#.name')#
William Seiter
05/13/08 03:17 A
Eww. There's no need for evaluate():
James Holmes
05/13/08 04:00 A
>Eww. There's no need for evaluate():
travis mitchell
05/13/08 10:39 A
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
travis mitchell
05/13/2008 01:57 AM

<cfdirectory directory="F:\MP3Music" name="Artists" sort="name ASC, size DESC" > <cfset artistList = valueList(Artists.name)> <cfset length=listlen(artistList)> <cfloop index="i" from="1" to="#length#">   <cfset Artist[i]=Artists.name[i]>     </cfloop> <cfloop index="j" from="1" to="#length#">   <cfdirectory directory="F:\MP3Music\#Artist[j]#" name="Songs#j#" sort="name ASC"> </cfloop> <cfloop index="k" from="1" to="#length#">   <cfoutput>     <h1>#Artists.name[k]#</h1>     <br />     <cfloop query="Songs#k#">   <!-- right here I am needing to call a variable sort of like #Songs#k#.name#, but I have not found anything to work !-->     </cfloop>   </cfoutput> </cfloop> ANY HELP WOULD BE APPRECIATED!!!  you can e-mail me at tmitchell.designs@gmail.com  i will appreciate any help!

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
William Seiter
05/13/2008 03:17 AM

#evaluate('Songs#k#.name')# ---------------------------------- William Seiter ColdFusion Web Developer / Consultant http://william.seiter.com Have you ever read a book that changed your life? Go to: http://www.winninginthemargins.com Use PassKey: GoldenGrove You'll be glad you did. ::-----Original Message----- :: ::Sent: Monday, May 12, 2008 10:56 PM ::To: CF-Talk ::Subject: defining variables in a new loop from an old loop :: ::<cfdirectory directory="F:\MP3Music" name="Artists" sort="name ASC, size ::DESC" > ::<cfset artistList = valueList(Artists.name)> ::<cfset length=listlen(artistList)> ::<cfloop index="i" from="1" to="#length#"> ::  <cfset Artist[i]=Artists.name[i]> ::    </cfloop> ::<cfloop index="j" from="1" to="#length#"> ::  <cfdirectory directory="F:\MP3Music\#Artist[j]#" name="Songs#j#" ::sort="name ASC"> ::</cfloop> ::<cfloop index="k" from="1" to="#length#"> ::  <cfoutput> ::    <h1>#Artists.name[k]#</h1> ::    <br /> ::    <cfloop query="Songs#k#"> ::  <!-- right here I am needing to call a variable sort of like ::#Songs#k#.name#, but I have not found anything to work !--> ::    </cfloop> ::  </cfoutput> ::</cfloop> :: :: :: ::ANY HELP WOULD BE APPRECIATED!!!  you can e-mail me at ::tmitchell.designs@gmail.com  i will appreciate any help! :: ::

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
James Holmes
05/13/2008 04:00 AM

Eww. There's no need for evaluate(): <cfset tempQuery = VARIABLES["Songs" & k]> <cfloop query="tempQuery">        <cfoutput>#tempQuery.name#</cfoutput> </cfloop> or of course just use the column name, since we're inside a loop: <cfloop query="Songs#k#">        <cfoutput>#name#</cfoutput>    </cfloop> On Tue, May 13, 2008 at 3:16 PM, William Seiter  wrote: > #evaluate('Songs#k#.name')# -- mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
travis mitchell
05/13/2008 10:39 AM

----- Excess quoted text cut - see Original Post for more ----- I LOVE YOU ALL!!  I'm self taught, and I'm still trying to get the hang of programming.  THANKS SO MUCH!!


<< Previous Thread Today's Threads Next Thread >>

Mailing Lists