I'm late to the party by trying to catch up on cfscript syntax. I've created a simple query in cfscript that executes and dumps out the correct data just fine:
qPositive = new Query(datasource="#APPLICATION.DSN#");
qPositive.setSQL(" my sql here ");
qPositive.addParam(name="xid",value="178",CFSQLTYPE="CF_SQL_INT");
qryPositive = qPositive.execute();
writeDump(qryPositive.getResult());
Gives me exactly what I expect. However, in the actual page
<cfoutput query="qryPositive">
throws an error that it's not defined.
Add getResult() after execute()
qryPositive = qPositive.execute().getResult();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With