I have a simple loop problem. I'm comapring two tables and want it to display 
serial numbers from both tables when there is a match. Unfotunately the way I 
have it setup it never finds a match even though I know there is a few. I think 
the loop is wrong. See code below.

Thanks.

RO
HWW

<CFQUERY name="get" datasource="pc_inventory">
Select * from inventory
where serialnumber = serialnumber
</cfquery>

<CFloop query="get">
<CFQUERY name="check" datasource="spice">
Select * from spice
where serialnumber = '#trim(get.serialnumber)#'
</cfquery>

<CFIF get.recordcount eq 1>
<CFoutput>#trim(check.serialnumber)# -- #trim(get.serialnumber)#<br></CFOUTPUT>
<cfelse>NO MATCH - <cfoutput>#get.recordcount#</cfoutput><br>
</CFIF>
</cfloop>
</html>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303088
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to