At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

@xeondxb - If I'm understanding correctly, I think the procedure is overcomplicating things .... Seems like you're simply trying to look up a user by email, and return true if they're a "super user"? If so, that doesn't require dynamic SQL, just a SELECT.

Also, RETURN has a different meaning than you may be thinking. It's generally used to return a "status" (succeeded or failed w/error) - NOT return data. You typically return data via a query (ie resultset) OR an OUTPUT variable. To keep it simple for now, return a query.

This example will return 1 when the record matching the email is a super user and 0 when it's NOT.

<cfif theProcResultName.isSuperUser>
this is a super user. do something
<cfelse>
not a super user. do something else...
</cfif>

0

xeondxbAuthor Commented: 2013-11-20

_agx_@

ur missing one thing in ur script .

when user will try to register as a super user. Script will check email address if email address is exist in the database it will send different code. from the code i'll know email is exist in the database, i'll show message to the user. If email does not exist in the database it'll go and check super user. Super can be one in the system.

Featured Post

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.