{"id":380,"date":"2010-09-14T16:04:17","date_gmt":"2010-09-14T20:04:17","guid":{"rendered":"http:\/\/erics-test-lab.com\/?p=380"},"modified":"2010-09-14T16:04:17","modified_gmt":"2010-09-14T20:04:17","slug":"coldfusion-result-attributes","status":"publish","type":"post","link":"https:\/\/www.esearing.com\/v2010\/2010\/09\/coldfusion-result-attributes\/","title":{"rendered":"coldfusion result attributes"},"content":{"rendered":"<p>During my exploration of the previous article I needed to view the SQL statement that was being dynamically generated.<br \/>\nFortunately Coldfusion has add the &#8220;result&#8221; attribute to cfquery. This allows you to see things like execution time, sql, sql arguments, etc&#8230;<\/p>\n<p><code>&lt;cfquery name=\"q\" datasource=\"myDSN\" result=\"rq\"&gt;><br \/>\nselect * from #mytable#<br \/>\nwhere source = #sourcesel#<br \/>\n&lt;\/cfquery&gt;<br \/>\n...<br \/>\n&lt;cfdump var=\"#rq#\"&gt;<br \/>\nYields all the info about the query stored in the result set.<br \/>\n...<br \/>\n&lt;cfoutput&gt;#rq.sql# &lt;\/cfoutput&gt;<br \/>\nyields the SQL only<br \/>\n \"select * from theRealTableName where source= 200\"<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>During my exploration of the previous article I needed to view the SQL statement that was being dynamically generated. Fortunately Coldfusion has add the &#8220;result&#8221; attribute to cfquery. This allows you to see things like execution time, sql, sql arguments, &hellip; <a href=\"https:\/\/www.esearing.com\/v2010\/2010\/09\/coldfusion-result-attributes\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,16,24],"tags":[],"class_list":["post-380","post","type-post","status-publish","format-standard","hentry","category-code","category-coldfusion","category-snippets-quick-code-tips-for-single-elements-attributes-or-details"],"_links":{"self":[{"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/posts\/380","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/comments?post=380"}],"version-history":[{"count":0,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/posts\/380\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/media?parent=380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/categories?post=380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esearing.com\/v2010\/wp-json\/wp\/v2\/tags?post=380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}