well, i got some feedback from the yahoo group and i had to use a variable
which was set before entering the inner loop...
hope you MM folks got this on the plate for CF5... very frustrating....
Terry Bader
IT/Web Specialist
Macromedia Certified Coldfusion Developer
EDO Corp - Combat Systems
(757) 424-1004 ext 361 - Work
[EMAIL PROTECTED]
(757)581-5981 - Mobile
[EMAIL PROTECTED]
icq: 5202487 aim: lv2bounce
http://www.cs.odu.edu/~bader
> -----Original Message-----
> From: Terry Bader [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 03, 2001 10:26 AM
> To: Cf-Talk (E-mail); HRCF user group (E-mail); ColdFusion -
> Yahoo Group
> (E-mail)
> Subject: [cold_fusion] Unusual Results, help
>
>
> Ok, i'm having some problems with the below code.... here's
> the problem...
> in the loop <CFLOOP QUERY="qry_missioncomm"> it is always seeing
> qry_missions.mission_id being 1....
>
> if you notice the test code i put in just before it, i see that
> qry_missions.mission_id is and check to make sure the
> previous query has
> records... then i set a test variable to qry_missions.mission_id
> as such:
>
> <CFOUTPUT>#qry_missions.mission_id#,#qry_missioncomm.recordcou
> nt#</CFOUTPUT>
> -before<BR>
> <CFSET test = qry_missions.mission_id>
>
> so in the 2nd iteration of this loop, i get:
> 2,9-before
>
> with test being set to 2
>
> now comes the loop:
> <CFLOOP QUERY="qry_missioncomm">
>
> followed by:
> <CFOUTPUT>#test# should equal
> #qry_missions.mission_id#</CFOUTPUT>-test<BR>
>
> and wtf??? i get:
> 2 should equal 1-test
>
> ?????????? why isnt the qry_missions.mission_id equal to 2 inside the
> second loop??? there are no other declarations here and
> after the loop,
> qry_missions.mission_id is equal to 2....
>
>
> CODE HERE:
> --------------------------------------------------------------
> --------------
> -----------------------------------------------------------
>
> <CFQUERY NAME="qry_missions" DATASOURCE="#request.mainDSN#">
> SELECT *
> FROM tbl_mission
> WHERE mission_id <> 0
> </CFQUERY>
>
> <CFLOOP QUERY="qry_missions">
>
> <CFQUERY NAME="qry_missioncomm" DATASOURCE="#request.mainDSN#">
> SELECT *
> FROM tbl_node
> WHERE node_id IN
> (
> SELECT node_id
> FROM tbl_mission_comm
> WHERE mission_id = #qry_missions.mission_id#
> )
> </CFQUERY>
>
>
> <CFOUTPUT>#qry_missions.mission_id#,#qry_missioncomm.recordcou
> nt#</CFOUTPUT>
> -before<BR>
> <CFSET test = qry_missions.mission_id>
>
> <CFLOOP QUERY="qry_missioncomm">
>
> <CFOUTPUT>#test# should equal
> #qry_missions.mission_id#</CFOUTPUT>-test<BR>
>
> <CFQUERY NAME="qry_missionq"
> DATASOURCE="#request.mainDSN#">
> SELECT *
> FROM tbl_question
> WHERE q_node = #qry_missioncomm.node_id#
> AND q_mission =
> #qry_missions.mission_id#
> AND q_deleted = 0
> </CFQUERY>
>
> <CFOUTPUT>#qry_missioncomm.node_id#-node
> #qry_missions.mission_id#-mission</CFOUTPUT><BR>
>
> </CFLOOP>
> </CFLOOP>
>
>
> Terry Bader
> IT/Web Specialist
> Macromedia Certified Coldfusion Developer
> EDO Corp - Combat Systems
> (757) 424-1004 ext 361 - Work
> [EMAIL PROTECTED]
>
>
> (757)581-5981 - Mobile
> [EMAIL PROTECTED]
> icq: 5202487 aim: lv2bounce
> http://www.cs.odu.edu/~bader
>
>
>
>
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists