Yep your correct !!

Also I needed to put a one in the ArrayNew() declaration.

Cheers !

-----Original Message-----
From: stas [mailto:[EMAIL PROTECTED]]
Sent: 30 April 2001 16:00
To: CF-Talk
Subject: Re: Arrays and Structures storing query values


It looks like you have to do StructNew within the loop for every iteration.
In your code you are only doing that once, for the first array element.

----- Original Message -----
From: "Darren Adams" <[EMAIL PROTECTED]>


<!--- query the old newsroom database--->

<cfquery name="news" datasource="newsadmin" dbtype="ODBC">
select * from pressreleasetable
ORDER by pressreleasedate DESC
</cfquery>

<!---Setup an array with a structure --->

<cfset oldnews = ArrayNew()>
<cfset oldnews[1] = StructNew()>
<!---add others here later e.g. prsub,prcontent,date etc... --->

<Cfoutput query="news">
<cfset oldnews[news.currentrow].headline = #pressreleaseheader#>
</cfoutput>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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

Reply via email to