20 lines
719 B
Text
20 lines
719 B
Text
<cfsetting showdebugoutput="false">
|
|
<cfsetting enablecfoutputonly="true">
|
|
<cfcontent type="application/json; charset=utf-8" reset="true">
|
|
|
|
<cfset targetBusinessID = 44>
|
|
|
|
<cfquery name="qUpdate" datasource="payfrit">
|
|
UPDATE lt_Users_Businesses_Employees
|
|
SET BusinessID = <cfqueryparam cfsqltype="cf_sql_integer" value="#targetBusinessID#">
|
|
</cfquery>
|
|
|
|
<cfquery name="qCount" datasource="payfrit">
|
|
SELECT COUNT(*) AS cnt FROM lt_Users_Businesses_Employees WHERE BusinessID = <cfqueryparam cfsqltype="cf_sql_integer" value="#targetBusinessID#">
|
|
</cfquery>
|
|
|
|
<cfoutput>#serializeJSON({
|
|
"OK": true,
|
|
"MESSAGE": "All employee records reassigned to BusinessID #targetBusinessID#",
|
|
"COUNT": qCount.cnt
|
|
})#</cfoutput>
|