ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 7th, 2004, 01:41 PM
FALCONSEYE FALCONSEYE is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 377 FALCONSEYE Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 16 h 57 m 14 sec
Warnings Level: 15
Number of bans: 1
Reputation Power: 0
Question Structure question

i have the following code

<cfoutput query="getResults">
<cfset BTStruct['BD'] = StructNew()>
<cfset BTStruct['BD'].BT = BreakTime>
<cfset BTStruct['BD'].BY = BreakType>
<cfdump var="#BTStruct['BD']#">
</cfoutput>

the Query getResults output something like
BreakTime BD BreakType
1200 11/29/2004 SOFT
1200 11/29/2004 SOFT
1200 11/30/2004 SOFT
1200 11/30/2004 SOFT


i am kind of lost because i am not sure how to refer a certain BTStruct['11/29/2004'] and get .BT and .BY

any ideas ? thanks

Reply With Quote
  #2  
Old December 7th, 2004, 02:14 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,689 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 16 h 33 m 51 sec
Reputation Power: 53
So you want to determine what key is being referenced given its value? You can loop through it or do try structFind().
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
  #3  
Old December 7th, 2004, 02:42 PM
FALCONSEYE FALCONSEYE is offline
Permanently Banned
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 377 FALCONSEYE Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 Day 16 h 57 m 14 sec
Warnings Level: 15
Number of bans: 1
Reputation Power: 0
i guess i am trying to see how can i retrieve the key values of
BTStruct['11/29/2004'] ?
or maybe this is not the way to go...

i asked this before but this is what i am trying to accomplish

http://216.15.150.61/test9.cfm

only problem is that table is static and i am trying to create a dynamic one, where the number of rows, number of columns for each weekday changes. also, notice the rowspan on the very first column.
when you draw a table, is it possible to say draw the first column, then go back and draw the second column, and go back draw the third column?
of course, every single time i go back i need to run the query to get the results for say Tuesday, Wednesday. is it possible to do this? or should i do something else?

Reply With Quote
  #4  
Old December 7th, 2004, 02:56 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,689 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 16 h 33 m 51 sec
Reputation Power: 53
I'm not understanding what you're trying to do...

You don't look for a structure value like this:

BTStruct['11/29/2004']

You look up the value by specifying the key, like this:

BTStruct['BT']

or like this:

BTStruct.BT

It looks like maybe you want to just try playing around with structures and you'll get the hang of them.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Structure question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT