I think I understand a little more.
  Run a CFQUERY to get all the data.  This creates a query object in 
ColdFusion.
  A query is an array of structures, by definition.  Structures are 
name-value pairs, like an associative array.  So, in essence a 2 
dimensional array automatically.  You can use the query attribute of either 
CFLOOP or CFOUTPUT to loop over the data and display it.
   I'm going to assume (uh, oh) that you know the columns that are being 
returned and will be able to hard-code the column list:

<CFQUERY name="myquery">
  select * from mytable
</CFQUERY>

<TABLE>
<CFOUTPUT query="myquery">
<TR>
  <TD>#myquery.column1#</TD>
  <TD>#myquery.column2#</TD>
  <TD>#myquery.column3#</TD>
</TR>
</CFOUTPUT>
</TABLE>

   That is untested code, but it should give you the general gist of what 
to do.


At 07:05 AM 08/27/2001 -0700, you wrote:
>Hi, Jeffry,
>
>Thanks for the response.
>
>It is a database table. What I want to do is to make an array dynamically
>without hard coded 3000 rows in the array for a select drop down. I'll look
>into the CFLOOP. I'm still new in CF and sometimes do not have a clue where to
>start.
>
>Thanks again,
>Julia
>
>
>Jeffry Houser <[EMAIL PROTECTED]> wrote:
>
>   When you say tables, do you mean HTML tables or database tables?
>   Where are you getting the information from?  A Query?  Queries are stored
>in memory as an array of structures.  You should be able to display the
>data using a simple CFOUTPUT or CFLOOP.
>
>At 02:49 PM 08/26/2001 -0700, you wrote:
> >Hi, Gurus,
> >
> >I'm having problem with creating an 2-D array dynamically. I have two tables
> >that are updated daily. Hard coded 3000 rows on an array is not a way to
> >display data.  Can someone shed some light on how to do it? Can you direct
>me
> >to any source that cover how to do it?
> >
> >Best Regards,
> >Julia Phu
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to