> Right, but my point was that if you did not pass variables into your
> cfquery, why would you need a cfqueryparam? for example, consider this
> select statement:
> 
> select emp.name, emp.salary
> from emp
> where emp.id = 324
> 
> would you use a cfqueryparam in the above query? like this:
> 
> select emp.name, emp.salary
> from emp
> where emp.id = <cfqueryparam cfsqltype="cf_sql_varchar" value="324">
> 
> I would have to say you could, but it is not necessary. Using it won't
> give you any advantage since cfqueryparam is used for variable
> binding, and since there is no variable to bind, why use it?

In this particular case, viewed alone, there's no reason to do this.
However, you might have another query somewhere else like this:

select emp.name, emp.salary
from emp
where emp.id = 325

I think this would generally result in two execution plans, which would
essentially be the same. In that case, why have the database do the work of
recalculating the second execution plan?

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized 
instruction at our training centers in Washington DC, Atlanta, 
Chicago, Baltimore, Northern Virginia, or on-site at your location. 
Visit http://training.figleaf.com/ for more information!


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:211213
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to