Paul Costello
08/11/2022, 8:04 PMDaniel Mejia
08/11/2022, 8:05 PMfunction getOutput(){
return "output inserted";
}
Daniel Mejia
08/11/2022, 8:07 PM<cfoutput>#getOutput()#</cfoutput>
Paul Costello
08/11/2022, 8:07 PMPaul Costello
08/11/2022, 8:07 PMPaul Costello
08/11/2022, 8:08 PMDaniel Mejia
08/11/2022, 8:08 PMPaul Costello
08/11/2022, 8:09 PMDaniel Mejia
08/11/2022, 8:09 PMDaniel Mejia
08/11/2022, 8:10 PMPaul Costello
08/11/2022, 8:11 PMDaniel Mejia
08/11/2022, 8:11 PMRodney
08/11/2022, 8:11 PMDaniel Mejia
08/11/2022, 8:11 PMPaul Costello
08/11/2022, 8:13 PMDaniel Mejia
08/11/2022, 8:13 PMRodney
08/11/2022, 8:14 PM<cfreturn crateSite.newThing>
will work with your existing query.Paul Costello
08/11/2022, 8:17 PMDaniel Mejia
08/11/2022, 8:19 PMselect scope_identity()
Paul Costello
08/11/2022, 8:21 PMAdam Cameron
output
statement is running on the database server, your CFML code is running on a CFML server. The CFML server can't see what yer "outputting" on the DB server, and whether or not the outputted value is available to other code running on the DB, doesn't mean it's available on the CFML server.
The CFML server sends an SQL statement (the stuff between the <cfquery>
tags) to the DB server, the DB server runs that statement, and then returns a result. output inserted.sitesettingsidentifier as newThing
sets a value called newThing
on your DB server. However all that takes place on the DB server. The CFML server has no idea about that. All it's doing is sitting there waiting for the end result of the overall SQL statement (whatever it is; in your case an INSERT
). It never knows/cares how anything else that SQL string you have in your`<cfquery>` tag might be interpretted on the DB server.
For all intents and purposes the content between the <cfquery>
tags might as well be !! !! !!!!! !!!!!!!! !!!!! !!!
. It doesn't understand it, and doesn't care.
https://i2.paste.pics/da8d27f6c17bad70758c25dd7817a23d.png▾
Asher Densmore-Lynn
08/16/2022, 4:48 AMAdam Cameron