Skip to content

Instantly share code, notes, and snippets.

@marcesher
Created February 25, 2012 16:01
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 marcesher/1909237 to your computer and use it in GitHub Desktop.
Save marcesher/1909237 to your computer and use it in GitHub Desktop.
How many concurrent requests does it take to get into the throw?
<cfcomponent>
<cffunction name="getArtist" output="false" access="public" returntype="any" hint="">
<cfargument name="id" type="numeric" required="true"/>
<cfquery datasource="cfartgallery" name="artist">
select *
from artists
where artistid = <cfqueryparam value="#arguments.id#" cfsqltype="cf_sql_integer"/>
</cfquery>
<cfif artist.artistid neq arguments.id>
<cfthrow message="WTF?! #artist.artistid# instead of #arguments.id#">
</cfif>
<cfreturn artist>
</cffunction>
</cfcomponent>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment