Also if that shows the query itself is in fact pulling out the correct data then have you tried doing a cfoutput with the query attribute and eliminating the cfloop with the cfoutput within that? Something like:
<cfoutput query="Get_Days">#get_days.event_day#<br /></cfoutput> On 10/14/07, Aaron Rouse <[EMAIL PROTECTED]> wrote: > > What does it show when you run a cfdump on the query? <cfdump > var="#get_days#" /> > > On 10/14/07, Rick Faircloth < [EMAIL PROTECTED]> wrote: > > > > @ All... > > > > This is just nuts... > > > > I can run this sql in an editor and get the correct results: > > > > select distinct event_day from weekly_schedule order by event_day > > > > And the correct results are 1, 2, 4, 6. > > > > But if I run that same sql in a CF8 cfquery, scoping or not scoping > > every variable, all I get is 1, 1, 1, 1. This was working perfectly in > > CF > > 4.5. > > > > <cfquery name="get_days" datasource="#dsn#"> > > select distinct event_day from weekly_schedule order by > > event_day > > </cfquery> > > > > I even put just the query and output commands on a separate page > > and still get 1, 1, 1, 1. > > > > <cfquery name="get_days" datasource="#dsn#"> > > select distinct event_day from weekly_schedule order by > > event_day > > </cfquery> > > > > <cfloop query="get_days"> > > <cfoutput>#get_days.event_day#</cfoutput><br /> > > </cfloop> > > > > I just don't get it... > > > > Any more ideas, anyone? :o/ > > > > Rick > > > > > > > > > > > -----Original Message----- > > > From: Claude Schneegans [mailto:[EMAIL PROTECTED] > > > Sent: Sunday, October 14, 2007 11:49 AM > > > To: CF-Talk > > > Subject: Re: Why would this query not return the correct data? > > > > > > <cfloop query="get_days"> > > > <cfoutput>#event_days#</cfoutput> > > > </cfloop> > > > > > > This is an old CF bug: > > > Inside a loop, a column name alone always comes from the first record. > > > You must specify the query name to get the current row: > > > <cfloop query="get_days"> > > > <cfoutput>#get_days.event_days#</cfoutput> > > > </cfloop> > > > > > > -- > > > _______________________________________ > > > REUSE CODE! Use custom tags; > > > See http://www.contentbox.com/claude/customtags/tagstore.cfm > > > (Please send any spam to this address: [EMAIL PROTECTED]) > > > Thanks. > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion is delivering applications solutions at at top companies around the world in government. Find out how and where now http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291056 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

