|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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? |
|
#4
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Structure question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|