> -----Original Message-----
> From: Johnny Le [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, March 26, 2005 12:33 AM
> To: CF-Talk
> Subject: Best practice question?
> 
> Is it better to do this:
> 
> <cfoutput query="GetCourses">
>    #Dept_ID#   #CorName#   #CorLevel#<br>
>    </cfoutput>
> 
> or this:
> <cfoutput query="GetCourses">
>    #GetCourses.Dept_ID#   #GetCourses.CorName#   
> #GetCourses.CorLevel#<br>
>    </cfoutput>
> 
> I know that you should prefix your variables, but this seems 
> to be unnecessary.  I think I read somewhere that it actually 
> performs better without the prefix in this case.  I always 
> use the first one and for some reasons I kept thinking 
> "beginners" when I see the second one.  Am I wrong?

I might be crazy, but I seem to remember, at least in CF 4.x versions, that
if you scoped a query column within a cfoutput, it would only output the
data in the first row of the query, not the current row, no matter where you
were in the loop.  That might also have been the case when outputting query
data with cfloop, and I might have these totally reversed as far as which
exhibited the aforementioned behavior.  Either way, I never scoped query
columns when looping over a query for this reason.  I don't remember with
which version of CF this changed.  Like I said, I might be crazy and this
never was the case, but something tells me it was.

Andy



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200139
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to