One of the operations that we do often is insert multiple rows into a database.  Your inclination is probably to just loop over a cfquery and do the inserts.  While this will work it creates some excess overhead.   Your code may look something like this: <cfloop array="#users#" index="u"> <cfquery name="insertData"> insert into mytable (firstname, lastname, email) values ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#u.firstname#">, <cfqueryparam cfsqltype="cf_sql_varchar" value="#u.lastname#">, <cfqueryparam cfsqltype="cf_sql_varchar" value="#u.email#"> ) </cfquery></cfloop> While this fundamentally works it can cause performance issues.  Depending on configuration, […]
  
  
  
  
               
Comments: