Open Source Conference For CFML Developers

Just in case you didn't know...there's a pretty cool conference coming up called OpenCF Summit. It's a conference where you can listen to, meet, speak with, and even yell at many of the lead geeks and engineers working feverishly on a slew of free and open source software from the CFML world (that's ColdFusion Markup Language for you non-CFML-knowing peeps).

The conference runs February 24-26, 2012 in Dallas, Texas. Considering the conference costs only $72, it's quite the steal! Plus, did I mention there's a ton of free and open source software?

So get on over to http://opencfsummit.org to learn more and register now!

Cheers!

Sublime Text 2 and .less Syntax Highlighting

So you've hopped onto the Sublime Text 2 bandwagon and ready to roll with {less}. Now you simply want to enable syntax highlighting while working on .less files...right? Well, it's actually quite simple!

First, open a .less file in Sublime Text 2. Then View > Syntax > Open all with current extension as... > CSS

OR...

After originally publishing this, of course I stumble across a github project called Less-sublime. Using the Package Control plugin, it's an absolute breeze to setup. Even if you don't, simply follow the installation directions on the github project.

So there you go...two methods for getting {less} syntax highlighting for you! Either way works great, but obviously the github project offers a bit more {less}-specific syntax support.

Hope that helps...cheers!

ColdFusion CFScript Query of Queries Example

This post is more for me than anything else...but I couldn't find a decent example of how to write a query of queries in ColdFusion's CFScript syntax. Below you'll see two queries; the first one is a simple query using ColdFusion's auto-generated dsn, the second one narrows the result set just a bit.

<cfscript>
    // Basic Query Syntax
    q1 = new Query();
    q1.setDatasource('cfartgallery');
    q1.setSQL('select * from artists');
    rs1 = q1.execute().getResult();
    WriteDump(var=rs1,label='RS1');
    
    // Query of Queries
    q2 = new Query();
    q2.setDBType('query');
    q2.setAttributes(rs=rs1); // needed for QoQ
    q2.addParam(name='state', value='CO', cfsqltype='cf_sql_varchar');
    q2.setSQL('SELECT * FROM rs where state = :state');
    q2.setMaxRows(2); // limit max rows, if desired
    rs2 = q2.execute().getResult();
    WriteDump(var=rs2,label='RS2');
</cfscript>

This should produce something similar to the following output:

Hope this helps...cheers!

More Entries

© 2012, Stephen J. Withington, Jr.  |  BlogCFC was created by Raymond Camden – Version 5.9.004

Creative Commons License  |  This work is licensed under a Creative Commons Attribution 3.0 Unported License.