I recently found myself in need of a countdown timer. Out of laziness I Googled around a bit but found nothing I wanted to use so I relented and threw this together. Enter a number of seconds and the countdown timer will count down to zero from that time. Download the source here.
I don’t claim to be a ColdFusion expert by any stretch of the imagination, but recently I found myself in need of coming up with a way to output query results to an XML file. My example below is based on an absolutely hideous article I stumbled across on the ColdFusion Developer Center. The example they provide has several errors in syntax: unclosed tags, unclosed quotes, unOPENED pounds, etc. It also only outputs one record!
After about an hour of playing with it I was able to get the code working properly and I thought I’d share a very basic example. The following code queries a database for names and phone numbers then outputs them all to a file name phonelist.xml in the current path:
<cfquery name="qGetPhoneList" datasource="datasource">
select first_name,last_name,phone from employees
<!—Create a temporary variable "tempxml" to hold our XML document—>