macromedia.coldfusion.getting_started
[Top] [All Lists]

Re: Why setting var in CFFUNCTION causes error

Subject: Re: Why setting var in CFFUNCTION causes error
From: "mega_L"
Date: Mon, 26 Jan 2009 20:54:07 +0000 UTC
Newsgroups: macromedia.coldfusion.getting_started

The problem I'm facing is I need to use more than 1 cfset var
   <CFFUNCTION name="editEdu">
       <cfargument name="Name1">
       <cfargument name="Name2"/> 
       <cfargument name="NameID"/>

      <CFSET var Variable1="#Arguments.Name1.#">
      <CFSET var Variable2="#Arguments.Name2#">
     <CFSET var Variable3="#Arguments.NameID#">

      <CFSWITCH expression="#Title#">
        <CFCASE value="Pres">
          <cfset var ThisTitle="President">
       </CFCASE>
        <CFCASE value="VP">
          <cfset var ThisTitle="Vice President">
       </CFCASE>
        .........................etc
     </CFSWITCH>
    
    <cfquery name="team" datasource="cfdocexamples">
     select columnames....from tablename
     Where ID=#Variable3#
     and Title= '#ThisTitle#'
   </cfquery>

        
   </CFFUNCTION>


<Prev in Thread] Current Thread [Next in Thread>