Copy link to clipboard
Copied
It seems that not long ago when one would perform a databse query in cfscript (using Cold Fusion 9) via the following method:
theQuery = new Query(datasource=APPLICATION.dsn,sql="
SELECT * FROM some_table
").execute().getResult();
That if there were no records returned from the query that what got returned was an empty query object.
NOW, it appears that what is returned is 'undefined', which is breaking my code.
Does anybody know why this is happening?
Copy link to clipboard
Copied
When I do this:
theQuery = new Query(datasource="dw",sql="SELECT * FROM event where 1 = 2").execute().getResult();
</cfscript>
<cfdump var="#thequery#" metainfo=no>
I get an empty query object.
What is the line of code that is generating the error?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now