I am using a loop to query a table and create directores from property names that have been stored. The problem is there are about 150 properties an it only seems to be creating about 75 of the directories. For whatever reason it does not complete. Here's the code:
A couple of the fields are null, could that stop the loop from completing?
----------------------------------------
Internet Marketing - de·ci·phered
Always Learning...
Code:
<cfquery name="dirs" datasource="#dsn#">
SELECT ID, Directory FROM property
</cfquery>
<cfloop query="dirs">
<cfset propIndexSrc = "<cfset pagename='#dirs.Directory#'>
<cfset isProperty=true>
<cfset path = '../'>
<cfset id = #dirs.ID#>
<cfinclude template='##path##includes/masterinclude.cfm'>">
<cfdirectory action="create" directory="#ExpandPath('../#dirs.Directory#')#" mode="777">
<cffile action="write" output="#propIndexSrc#" file="#ExpandPath('../#dirs.Directory#/index.cfm')#">
</cfloop>
A couple of the fields are null, could that stop the loop from completing?
----------------------------------------
Internet Marketing - de·ci·phered
Always Learning...