Kay lives here

working with the web

ColdFusion_icon

Yet another example of how ColdFusion makes coders’ lives easier

Fotolia_8039701_Subscription_XL

When peo­ple ask what the dif­fer­ence is between Cold­Fu­sion and other server-side script­ing lan­guages, I tend to say some­thing along the lines of “it’s designed to make the sim­ple tasks you do all the time really, really easy”. Things like query­ing data­bases and loop­ing over results, send­ing email etc are com­mon tasks that take fewer lines of code in Cold­Fu­sion than other languages.

I just read about a new fea­ture of Cold­Fu­sion 8 on Ben Forta’s blog that blew me away — not because it was ground-breaking or tricky or a major fea­ture peo­ple had been beg­ging for, but because it illus­trates exactly what’s cool about Cold­Fu­sion: CFQUERY returns a RESULT struc­ture, and if appro­pri­ate and the data­base sup­ports it, the last cre­ated identity/auto-increment value is returned auto­mat­i­cally for you.

Accord­ing to Ben, it’s DBMS-specific and the actual name of the vari­able depends on the data­base being used, but still it is very handy. It’s easy enough to man­u­ally return that value with your query when you need it, but it’s even eas­ier if it’s already there. It prob­a­bly won’t save any­one a ton of time, but shows that peo­ple at Adobe are think­ing about how they can make our lives just a lit­tle bit easier.

Comments are closed.