Hi everyone. I am trying to loop over the results of a query, and match the
names from that query with the names from another query. Here's what it
look like:
<cfloop query="qcfGetContactNames">
<cfif qcfGetOldContactInfo.mainContactName is qcfGetContactNames.FullName>
<cfoutput>
<table>
<tr>
<td>#qcfGetContactNames.FullName# #mainContactTitle#
#mainContactEmail#</td>
</tr>
</table>
</cfoutput>
</cfif>
</cfloop>
The two queries look like this:
<cfquery name="qcfGetContactNames" datasource="FSLibrary_Dev">
SELECT EventContactFirstName+' '+EventContactLastName as FullName
FROM dbo.tbl_EP_EventContacts
ORDER BY EventContactFirstName Asc
</cfquery>
<cfquery name="qcfGetOldContactInfo" datasource="FSLibrary_Dev">
SELECT mainContactName, mainContactTitle, mainContactAreaCode,
mainContactPhone, mainContactFaxAreaCode, mainContactFax, mainContactEmail
FROM dbo.tblIndustryEvents
ORDER BY mainContactName Asc
</cfquery>
I keep getting no records matching, but I know that the names match, because
the names from the first query where pulled from the database in the second
query, separated, and added. So the names are exactly the same. Any ideas?
Thanks in advance,
Chris Martin
www.fsenablers.com
www.fslink.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists