{"id":328,"date":"2012-01-14T22:23:22","date_gmt":"2012-01-15T03:23:22","guid":{"rendered":"http:\/\/www.cfchimp.com\/wordpress\/?p=328"},"modified":"2024-12-05T20:08:42","modified_gmt":"2024-12-06T01:08:42","slug":"coldfusion-9-select-in-query-using-ormexecutequery","status":"publish","type":"post","link":"https:\/\/csimmons.dev\/blog\/2012\/01\/coldfusion-9-select-in-query-using-ormexecutequery\/","title":{"rendered":"ColdFusion 9 SELECT IN query using ormExecuteQuery()"},"content":{"rendered":"<p>For some reason this took me some effort to figure out.  Maybe others will find it useful.<\/p>\n<pre class=\"prettyprint\">\r\n<cfscript>\r\nCategoryList = '1,2,3';\r\nCategories = ormExecuteQuery(\"from Category where Id IN (:IdList)\",{IdList=ListToArray(CategoryList)});\r\n<\/cfscript>\r\n<\/pre>\n<p>If you know a better way please drop me a comment.  I <a title=\"Link to Adobe ColdFusion forum\" href=\"http:\/\/forums.adobe.com\/message\/4136917\" target=\"_blank\">posted this in the Adobe Coldfusion forum<\/a> for a few days but didn&#8217;t get anything.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For some reason this took me some effort to figure out. Maybe others will find it useful. CategoryList = &#8216;1,2,3&#8217;; Categories = ormExecuteQuery(&#8220;from Category where Id IN (:IdList)&#8221;,{IdList=ListToArray(CategoryList)}); If you know a better way please drop me a comment. I posted this in the Adobe Coldfusion forum for a few days but didn&#8217;t get anything.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"_cloudinary_featured_overwrite":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[68],"tags":[48,12,33,16],"class_list":["post-328","post","type-post","status-publish","format-standard","hentry","category-developer","tag-coldfusion","tag-developer","tag-orm","tag-sql"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pbVg43-5i","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/posts\/328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/comments?post=328"}],"version-history":[{"count":0,"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/posts\/328\/revisions"}],"wp:attachment":[{"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/media?parent=328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/categories?post=328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csimmons.dev\/blog\/wp-json\/wp\/v2\/tags?post=328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}