wrap it in <cffunction> tags :)

On 10/17/07, erik  tom <[EMAIL PROTECTED]> wrote:
> I need to rewrite the code so it looks like a function
> <cfif NOT StructIsEmpty(form)>
> <cfcontent type="text/xml; charset=UTF-8" reset="Yes" />
> <cfloop index="variables.i" from="1" to="#ListLen(form.categoryname)#">
>                          <cfset variables.thisCheckbox = 
> ListGetAt(form.categoryname,variables.i)>
>            <cftry>
>                  <cfstoredproc procedure="addCategory" 
> datasource="HotBanana_Manager">
>                                 <cfprocparam type="in" 
> cfsqltype="cf_sql_varchar" value="#variables.thisCheckbox#">
>                       <cfprocparam type="in" cfsqltype="cf_sql_varchar" 
> value="#session.schoolcode#">
>                                   <cfprocparam type="in" 
> cfsqltype="cf_sql_bit" value="#form.hidden#">
>
>     </cfstoredproc>
>              <cfcatch type="database">
>               There was a database error!
>             </cfcatch>
>          </cftry>
>          </cfloop>
>
>
>
>
>
>
>
> </cfif>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291350
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to