I am trying to grab the files names that are in the database
and then loop
over that list to use cfhttp to create queries which I then
join to create
one master query to select all the distict cities from the
list. I am
calling the function 'Cities'
There are 7 files names in the database (idxrs093007.txt,
idxrs100107.txt,
idxrs100207.txt, idxrs100307.txt, idxrs100407.txt,
idxrs100507.txt,
idxrs100607.txt) which I want to loop through and populate
the cfhttp url
string.
Anyone see anything glaring on why this doesn't work and what
can I change
to make it work. Thanks
<cffunction name="getFileNames" access="public"
returntype="query"
output="false" hint="I get the various file names from the
database">
<cfargument name="tableName" type="string"
required="yes">
<cfquery name="fileNames" datasource="bpopros">
Select *
from #tableName#
</cfquery>
<cfreturn fileNames>
</cffunction>
<!---Get Cities--->
<cffunction name="Cities" access="public"
returntype="query"
output="false" hint="I join all the Residentials">
<cfset files = getFileNames('ResFiles')>
<cfset i = 0>
<cfloop query="files">
<cfoutput>
<cfset i = i + 1>
<cfhttp
url="
http://www.bpoprosonline.com/assets/property/#files.fileName#"
method="GET" name="Res#i#" delimiter="|"
textqualifier="" firstrowasheaders="yes" />
</cfoutput>
</cfloop>
<cfquery name="Cities" dbtype="query">
SELECT DISTINCT(A.city, B.City, C.City, E.City, F.City,
G.City)
FROM Res1 A, Res2 B,Res3 C,Res4 D,Res5 E,Res6 F,Res7 G
</cfquery>
<cfreturn Cities>
</cffunction>
--
Wally Kolcz
MyNextPet.org
Founder / Developer
586.871.4126