Heya Mike,

The first time you do a list append, the list needs to exist, and in
your case it doesn't...

A quick and dirty fix would be:

<cfoutput query="getbookings">
 <cfset listname="property" & #propertyID#>
 <cfif NOT isdefined(listname)>
  <CFSET temp = SetVariable(listname,"")>
 </cfif>
 <cfset listname = listappend(#listname#, "#date#")>
</cfoutput>

Not sure if that will work exactly... but do you get my drift?

bye


Thursday, October 21, 2004, 2:41:34 PM, you wrote:

MK>  Can anyone see what's wrong with my logic here?

MK> I have a series of properties, and some booking dates. I run a query
MK> on a table of bookings and dates and i want to produce a list for each
MK> property, containing the bookings for that property, e.g.:

MK> property78 = (date1, date4, date17)
MK> property79= (date1, date22, date24, date19)
MK> etc.

MK> Here's my query: 

MK> <cfquery name="getbookings" datasource="#dsn#">
MK> SELECT propertyID, date 
MK> FROM bookings 
MK> ORDER BY propertyID
MK> </cfquery>

MK> And here's the list generation part that doesnt work (but I dont see
MK> why - can you?)

MK> <cfoutput query="getbookings">
MK> <cfset listname="property" & #propertyID#>
MK> <cfset listname = listappend(#listname#, "#date#")> 
MK> </cfoutput>


MK> The two properties in this test data are property 78 and 79.   when i
MK> try to output the list "property78" it throws an error 'unable to
MK> determine the value of the parameter'.  I assume that's because there
MK> is no #property78#. But i guess i've been too close to this for too
MK> long now. I cant see why there isnt.

 
MK> Cheers
MK> Mike Kear
MK> Windsor, NSW, Australia
MK> AFP Webworks
MK> http://afpwebworks.com
MK> .com,.net,.org domains from AUD$20/Year

MK> ---
MK> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
MK> To unsubscribe send a blank email to [EMAIL PROTECTED]
MK> Aussie Macromedia Developers: http://lists.daemon.com.au/


-----------------------
Ryan Sabir
Newgency Pty Ltd
2a Broughton St
Paddington 2021
Sydney, Australia
Ph (02) 9331 2133
Fax (02) 9331 5199
Mobile: 0411 512 454
http://www.newgency.com/index.cfm?referer=rysig 


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to