If you aren't using any kind of returned data from a query, don't worry
about giving the cfquery tag a name attribute. It's a few extra bytes you
can save on your fingers. I would even go so far as to recommend you delete
it. Less code means less bugs.

nathan strutz
[http://www.dopefly.com/] [http://hi.im/nathanstrutz]


On Tue, Mar 15, 2011 at 7:26 AM, Dain Anderson <da...@terradotta.com> wrote:

>
> I may have missed conversation of this over the years, so I figured I would
> ask.
>
> What's the current "take" on this (old?) practice? If I have a CFC function
> that deletes a record, and that CFC contains a single query, do you find it
> necessary to scope that query with a name?
>
> <cffunction name="DeleteMe">
>    <cfset var q = "" />
>    <cfquery datasource="#variables.ds#" name="q">
>        delete mah stuff...
>    </cfquery>
> </cffunction>
>
> I've been refactoring some CFCs and ran into some named deletions and
> thought this seemed odd to name them -- thoughts?
>
> -Dain
>
> …………………
> *Dain M. Anderson
> *Lead Developer
> Terra Dotta, LLC
> 501 W. Franklin Street, Suite 105
> Chapel Hill, NC 27516
> Phone/Fax: 877-DOTTA-77 (877-368-8277)
> http://TerraDotta.com <http://terradotta.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343036
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to