You need to send same email to multiple persons whose email address is there in one of the table in database
Instead of looping the database result you can readily use 'query' attribute in cfmail tag to send mail to multiple persons For Example:
Prior to ColdFusion 9, it was not always easy to <cfdump /> a variable when using <cfscript />.
Create a function or a utility component which you can then call from cfscript. Using the function, you can pass in "true" to stop the code execution anywhere you place the function call. This is useful for debugging chunks of code with a lot of conditional logic.
When passing a list into a query, and the the list contains STRING data types, each value must be surrounded with single quotes. Using <cfqueryparam /> the list can be formatted on the fly to adhere to this constraint in SQL.
Using <cfqueryparam /> in all ColdFusion queries is considered best practice for both preventing SQL injection attacks and improving query execution. Not only this, but you can use this tag to format the data without any extra string formatting functions.
I am working in a multi application environment. Recently I discovered a problem - when other applications hit my warehouse database, they insert some HTML tags, java-scripts. Those data are displaying in my system as report format in HTML, so the tags and scripts data are affecting my site. So, I started doing HtmlEditFormat() everywhere to protect my site, but I have almost a 1000 reports. It was a very bad task for me, so I tred to build up a function to do the job quickly without using HtmlFormat() function everywhere and without changing my warehouse data because all that data is valid.
That’s why I created an automated function which will refine data without modifying data in the database. It returns a query with any string values sanitized by HTMLEditFormat. Values of the type varchar,char,nvarchar,text,ntext are modified.
You have a filename set in a variable but would like to find out what the extension is for it, perhaps to display the proper file icon next to it.
Use the listLast() function to pull this out.
This site is produced in partnership with O'Reilly.