Main question first......

> Also, if you're using a database engine that allows TSQL, 
> then put the loop inside the CFQUERY and put a ; at the end 
> of each INSERT


This looks like a good tip, can this be done with other Databases as
well?  i.e. Oracle?   Have always coded the loop outside the cfquery
tag, anybody got any performance info on this?


> >     <cfloop list="#form.Accomidations#" index="x">
> >             <cfquery datasource="blah" name="insertAccomidation">
> >                     insert into tblAccomidations (personKey,
> > accomitationId) values(pid,x)
> >             </cfquery>
> >     </cfloop>
> 
> Not forgetting to put #'s around your variables;
> 
>       insert into tblAccomidations (personKey, accomitationId)
>       values(#pid#,#x#)


Jeez, where have all the cfqueryparam's gone.... can somebody tell me if
there is a reason *not* to use them in a hard coded query?  Should be
using them all the time where possible (unless your an uber coder and
you just *know* the reason on why not to use them in that particular
instance)

DC



                                
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
                                

Reply via email to