Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <cfoutput query="get_data">
- <cfset x = 0>
- <cfquery name="put_data" datasource="#variables.dsn#">
- insert into leads_owners_live (#cols#)
- values (
- <cfloop index="col" list="#cols#">
- <cfset x = x + 1>
- <cfset myVal = Evaluate(col)>
- <cfqueryparam value="#myVal#" cfsqltype="cf_sql_varchar">
- <cfif x neq ListLen(cols)>,</cfif>
- </cfloop>
- )
- </cfquery>
- </cfoutput>
- <!--- OR --->
- <cfoutput query="get_data">
- <cfset x = 0>
- <cfquery name="put_data" datasource="#variables.dsn#">
- insert into leads_owners_live (#cols#)
- values (
- <cfloop index="col" list="#cols#">
- <cfset x = x + 1>
- <cfqueryparam value="#get_data[col][currentRow]#" cfsqltype="cf_sql_varchar">
- <cfif x neq ListLen(cols)>,</cfif>
- </cfloop>
- )
- </cfquery>
- </cfoutput>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement