Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trycf/0bb497b1df639502a6cd0a41945ed4aa to your computer and use it in GitHub Desktop.
Save trycf/0bb497b1df639502a6cd0a41945ed4aa to your computer and use it in GitHub Desktop.
TryCF Gist
<cfscript>
qryEmpty = queryNew( 'col', 'Integer' )
qryPopulated = queryNew( 'col', 'Integer', [[2]] )
writedump( qryEmpty )
writedump( qryPopulated )
qoq = queryExecute(
'SELECT sum( col ) FROM qryEmpty',
[],
{ dbType = 'query' }
)
writedump( qoq )
qoq2 = queryExecute(
'SELECT sum( col ) FROM qryPopulated WHERE 1=2',
[],
{ dbType = 'query' }
)
writedump( qoq2 )
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment