What's the linkage to SomeOtherQuery?  When you are about to display
"#myquery.seminarsfor#", how do you know what you want to display (is it by
MyKey, or something else)?

You might be able to do it like this:

<cfquery name="variables.myquery">
Select * from mytable
</cfquery>

<cfset variables.mykeys = valuelist(variables.myquery)>

<cfoutput>
The value of field #variables.myquery.myvar[key_value]# is
#variables.myquery.myvalue[key_value]#.
<cfoutput>

but this requires knowing what key_value you want where.


-----Original Message-----
From: Rick Moon [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 09, 2000 8:17 PM
To: [EMAIL PROTECTED]
Subject: Need to take several row query and make into one row.


Hello,

The "why" for the following is an email unto itself, so if possible any
ideas on "how" would be greatly appreciate.

The cfquery name="MyQuery" is selecting from the following db table:

MyKey    |    MyVar            |     MyValue
---------------------------------------------
0001        |    ClientName      |    Rick
0002        |    SeminarsFor    |    aerospace
0003        |    RAMPrice        |    stable

Now I need to write (without looping or cfifing or cfswitching) or (changing
the the table itself) and (caching of some sort is desired):

The name of your seminar is: #MyQuery.SeminarsFor#
The state of CA is: #SomeOtherQuery.HighTaxes#

The only way I've been able to do it so far is to rebuild the above table
into:
ClientName |    SeminarsFor    |    RAMPrice
--------------------------------------------
Rick            |    aeospace        |     stable

But this constant table manipulation isn't practical.

Is the answer in sql? structures? arrays? or ?

TIA,

Rick









__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
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/cf-talk@houseoffusion.com/
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