Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cfloop not working??

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0


Hi Guys am encountering a problem with Cfloop.. here is the code
i have done and , itseems it displays only the first record for
the conditions.. but i need all the records that meet the condition..
please help SOS
-paul




<cfloop index=loopcount from=1 to=#qry_get_team_members.recordcount#>
<cfif #qry_get_team_members.rec_id[loopcount]# eq #member_idx#>
<div align=&quot;center&quot;>#qry_get_team_members.name[loopcount]# </div>
</cfif>
</cfloop>
</font></td>
<cfloop index=loopcount from=1 to=#qry_get_meetings.recordcount#>
<cfif qry_get_meetings.rec_id[loopcount] eq meeting_idx>
</cfif>
</cfloop>


 
The value #member_idx# is from the database? Maybe it should be #qry_get_team_members.member_idx[loopcount]#?

 
Hi Paul!

You may try this.

<cfloop index=&quot;loopcount&quot; from=&quot;1&quot; to=&quot;#qry_get_team_members.recordcount#&quot;>

<cfif #qry_get_team_members.rec_id[loopcount]# IS &quot;#member_idx#&quot;>


And You can try IS operator instead eq.

Hope it may work. All the Best.

micjohnson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top