Skip to content

Instantly share code, notes, and snippets.

@Zoramite
Created March 25, 2011 14:16
Show Gist options
  • Save Zoramite/886897 to your computer and use it in GitHub Desktop.
Save Zoramite/886897 to your computer and use it in GitHub Desktop.
Test the sql generated by the query cfc query.
<cfscript>
local.query = new Query(datasource = 'testDatasource');
local.query.setSql('
INSERT INTO testTable
(
type,
message
) VALUES (
:type,
:message
)');
local.query.addParam(name = 'type', value = 'testType', cfsqltype = 'cf_sql_varchar');
local.query.addParam(name = 'message', value = 'testMessage', cfsqltype = 'cf_sql_varchar');
local.query.execute();
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment