is there any way to dump the whole content of the "GetYPs" query into the
structure all at once without having to Loop through the query?  something
like...

<CFSET STTEMP = STRUCTNEW()> <!--- temporary structure --->
<CFSET STTEMP = "#GetYPs#">

also, what will be the scope of the STTEMP structure, I assume it will be
the page, unless you specify otherwise (client, server, etc), am I right... 

Bismarck Perez


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 31, 2000 4:27 PM
To: [EMAIL PROTECTED]
Cc: Robert Everland
Subject: Re: Structures, Arrays, Array of Structures


Here's an example:

<CFQUERY NAME="GetYPs" DATASOURCE="#DSN#" USERNAME="#user#"
PASSWORD="#pass#">
SELECT Class_ID, Class_Name, Pages, NewPages
FROM YellowPages (nolock)
</CFQUERY>

<CFSET STTEMP = STRUCTNEW()> <!--- temporary structure --->
<CFSET APPLICATION.YPS = STRUCTNEW()> <!--- final structure for Headings
--->
<CFLOOP QUERY="GetYPs">
<CFSET STTEMP["Class_ID"] = "#Class_ID#">
<CFSET STTEMP["Class_Name"] = "#Class_Name#">
<CFSET STTEMP["Pages"] = "#Pages#">
<CFSET STTEMP["NewPages"] = "#NewPages#">
<CFSET APPLICATION.YPS[STTEMP["Class_ID"]] = STRUCTCOPY(STTEMP)>
<CFSET TMPVAR = STRUCTCLEAR(STTEMP)>
</CFLOOP>

best,  paul

At 10:45 AM 8/31/00 -0400, you wrote:
>         Is there a way to add multiple records into a structure or do I
have
>to make an array of strucutres. Right now I made an aray of strucutures but
>I want to make sure that is the most logical way to be doing it.

----------------------------------------------------------------------------
--
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.

Reply via email to