RE: Why isn't my output showing up right?
> Holy... > > If you were here I'd kiss you. I remain thankful for small favors (and so should you!) > So I don't scope that nested cfoutput? (I hope I called > that right, I'm assuming whenever you name the query in > your output with And it just loops thru the results for > that Particular iteration of the output? You've got it right. You don't specify a QUERY attribute, and you don't need a GROUP attribute unless it contains its own child elements; for example, you could have a three-level hierarchy of countries, states and cities: #country# #state# #city# It's worth noting that this, in addition to lots of other good things to know, is covered in detail in the "Advanced ColdFusion MX Development" course offered by Fig Leaf Software and other Macromedia training partners: http://training.figleaf.com/ Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Why isn't my output showing up right?
on 2/12/03 12:55 PM, Dave Watts at [EMAIL PROTECTED] wrote: >> However this isn't working, whenever I put the loop >> in the output, it only returns one record. When I >> take OUT the loop, it returns all the records but >> only one rate: >> >> ... >> >> And here's version one of the output: >> > > Is there a reason you're using the GROUP attribute in CFOUTPUT? That's only > used when you want to build a hierarchical data display. For example, let's > say you had states and cities, and you wanted to select them all in one > query, but display them like this: > > state: > city_in_state > city_in_state > state2: > city_in_state > ... > > In that case, you could use nested CFOUTPUTs with the GROUP attribute to > display each state once (in the outermost CFOUTPUT), then display all cities > within the nested CFOUTPUT. > > > #state#: > > #city_in_state# > > Holy... If you were here I'd kiss you. So I don't scope that nested cfoutput? (I hope I called that right, I'm assuming whenever you name the query in your output with And it just loops thru the results for that Particular iteration of the output? Awesome...just awesome... ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Why isn't my output showing up right?
You need to nest s. Something like this will work for you: #PropertyName# #PropertyDescription# Rates #TempVariable# - #RatesSeason# #DollarFormat(RatesPrice)# - Original Message - From: "Jeff Small" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, February 12, 2003 12:41 PM Subject: Why isn't my output showing up right? > There are so many people yelling at me right now...I'm about to commit hari > kari...please help me... > > Okay, My query works. I know this because I can "test" it by clicking on my > recordset and clicking "test" and passing the appropriate variable. > > My Joins are working, this much I know. > > What I'm trying to do, is output the rates for each property. There are > multiple rates for each property. My thinking was to loop, using the query > to initialize my loop, and simply check for a match, then output that Row's > corresponding rates. > > However this isn't working, whenever I put the loop in the output, it only > returns one record. When I take OUT the loop, it returns all the records but > only one rate: > > Here's my query (like I said, tested, and it's returning the right stuff): > > SELECT RentalProperties.PropertyID, RentalProperties.PropertyName, > RentalProperties.PropertyPhoto, RentalProperties.PropertyType, > RentalProperties.PropertyAddress, RentalProperties.PropertyDescription, > RentalProperties.PropertyBedrooms, RentalRates.RatesID, > RentalRates.RatesPrice, > RentalRates.RatesSeason, RentalRates.RatesProperty > FROM (RentalLocations INNER JOIN RentalProperties ON > RentalLocations.LocationID=RentalProperties.PropertyLocation) INNER JOIN > RentalRates > ON RentalProperties.PropertyID=RentalRates.RatesProperty > WHERE RentalProperties.PropertyLocation = #URL.Location# > ORDER BY RentalProperties.PropertyID > > > And here's version one of the output: > > > #PropertyName# > #PropertyDescription# > > Rates > > #TempVariable# - #RatesSeason# #DollarFormat(RatesPrice)# > > > > Which works fine, but only returns (as expected) ONE rate, when in fact > there are multiple rates. > > So I added a cfloop, like so: > > src="images/rentals/#PropertyPhoto#"> > #PropertyName# > #PropertyDescription# > > Rates > > > #TempVariable# - #RatesSeason# > #DollarFormat(RatesPrice)# > > > > > And now I only return one record. > > What gives? I know it's something so simple, that I'm going to bang my head > when I see it. > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Why isn't my output showing up right?
> However this isn't working, whenever I put the loop > in the output, it only returns one record. When I > take OUT the loop, it returns all the records but > only one rate: > > ... > > And here's version one of the output: > Is there a reason you're using the GROUP attribute in CFOUTPUT? That's only used when you want to build a hierarchical data display. For example, let's say you had states and cities, and you wanted to select them all in one query, but display them like this: state: city_in_state city_in_state state2: city_in_state ... In that case, you could use nested CFOUTPUTs with the GROUP attribute to display each state once (in the outermost CFOUTPUT), then display all cities within the nested CFOUTPUT. #state#: #city_in_state# Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Why isn't my output showing up right?
There are so many people yelling at me right now...I'm about to commit hari kari...please help me... Okay, My query works. I know this because I can "test" it by clicking on my recordset and clicking "test" and passing the appropriate variable. My Joins are working, this much I know. What I'm trying to do, is output the rates for each property. There are multiple rates for each property. My thinking was to loop, using the query to initialize my loop, and simply check for a match, then output that Row's corresponding rates. However this isn't working, whenever I put the loop in the output, it only returns one record. When I take OUT the loop, it returns all the records but only one rate: Here's my query (like I said, tested, and it's returning the right stuff): SELECT RentalProperties.PropertyID, RentalProperties.PropertyName, RentalProperties.PropertyPhoto, RentalProperties.PropertyType, RentalProperties.PropertyAddress, RentalProperties.PropertyDescription, RentalProperties.PropertyBedrooms, RentalRates.RatesID, RentalRates.RatesPrice, RentalRates.RatesSeason, RentalRates.RatesProperty FROM (RentalLocations INNER JOIN RentalProperties ON RentalLocations.LocationID=RentalProperties.PropertyLocation) INNER JOIN RentalRates ON RentalProperties.PropertyID=RentalRates.RatesProperty WHERE RentalProperties.PropertyLocation = #URL.Location# ORDER BY RentalProperties.PropertyID And here's version one of the output: #PropertyName# #PropertyDescription# Rates #TempVariable# - #RatesSeason# #DollarFormat(RatesPrice)# Which works fine, but only returns (as expected) ONE rate, when in fact there are multiple rates. So I added a cfloop, like so: #PropertyName# #PropertyDescription# Rates #TempVariable# - #RatesSeason# #DollarFormat(RatesPrice)# And now I only return one record. What gives? I know it's something so simple, that I'm going to bang my head when I see it. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4