You would use loop.
<cfquery datasource="Tester" name="GetNumbers">
SELECT Quantity, ID FROM TestTable
</cfquery>
<cfset QuantityTotal = ArrayNew(1)>
<cfloop query="GetNumbers" index="x" from="1"
to="#GetNumbers.RecordCount#">
<cfset QuantityTotal[x] = #Quantity#>
</cfloop>
Derek
"S R" <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...
> How do I populate a one dimensional array from a query?? I'm having
trouble
> figuring out how I make the 'Array number' dynamic:
>
> <cfquery datasource="Tester" name="GetNumbers">
> SELECT Quantity, ID FROM TestTable
> </cfquery>
>
> <cfoutput query="GetNumbers">
>
> <cfset QuantityTotal = ArrayNew(1)>
>
> <cfset QuantityTotal[??]] = #Quantity#>
>
> </cfoutput>
>
>
> <cfoutput>
> #QuantityTotal[??]#<br>
> </cfoutput>
>
> Thanks
>
> Sal
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
> --------------------------------------------------------------------------
----
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.