Advertisement
snarfblat

Untitled

Sep 1st, 2011
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. <cfoutput query="get_data">
  2. <cfset x = 0>
  3.  
  4. <cfquery name="put_data" datasource="#variables.dsn#">
  5. insert into leads_owners_live (#cols#)
  6. values (
  7. <cfloop index="col" list="#cols#">
  8. <cfset x = x + 1>
  9. <cfset myVal = Evaluate(col)>
  10. <cfqueryparam value="#myVal#" cfsqltype="cf_sql_varchar">
  11. <cfif x neq ListLen(cols)>,</cfif>
  12. </cfloop>
  13. )
  14. </cfquery>
  15.  
  16. </cfoutput>
  17.  
  18. <!--- OR --->
  19.  
  20. <cfoutput query="get_data">
  21. <cfset x = 0>
  22.  
  23. <cfquery name="put_data" datasource="#variables.dsn#">
  24. insert into leads_owners_live (#cols#)
  25. values (
  26. <cfloop index="col" list="#cols#">
  27. <cfset x = x + 1>
  28. <cfqueryparam value="#get_data[col][currentRow]#" cfsqltype="cf_sql_varchar">
  29. <cfif x neq ListLen(cols)>,</cfif>
  30. </cfloop>
  31. )
  32. </cfquery>
  33.  
  34. </cfoutput>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement