Created
February 25, 2012 16:01
-
-
Save marcesher/1909237 to your computer and use it in GitHub Desktop.
How many concurrent requests does it take to get into the throw?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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