Skip to content

Instantly share code, notes, and snippets.

@chrisdpeters
Created February 14, 2012 22:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisdpeters/1831365 to your computer and use it in GitHub Desktop.
Save chrisdpeters/1831365 to your computer and use it in GitHub Desktop.
Full CFScript CFCs Aren’t Yet Where They Need To Be
local.queryService = new Query(datasource=get('dataSourceName'));
local.queryService.setSql("
SELECT DISTINCT
A.*
FROM
apps A
JOIN appgroupmemberships G
ON A.id = G.appid
WHERE
G.usergroupid IN (#local.groupIds#)
AND deletedat IS NULL
");
local.apps = local.queryService.Execute().GetResult();
<cfquery datasource="#get('dataSourceName')#" name="local.apps">
SELECT DISTINCT
A.*
FROM
apps A
JOIN appgroupmemberships G
ON A.id = G.appid
WHERE
G.usergroupid IN (#local.groupIds#)
AND deletedat IS NULL
</cfquery>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment