Ok what i am trying to do is a search funnction. I have 4 fields in my DB that i want to search on.
  1. member
  2. Email
  3. category
  4. ContractNumber


But i only want to search them if someone type something in those fields on the interface.

so my code like like
PHP Code:

<CFSET SQL "SELECT * FROM precontract ">
<
CFSET SQL_Coubr >
    <
cfif form.member neq  "">
        <
cfif SQL_Coubr eq  "0">
            <
CFSET SQL SQL"WHERE ">
        </
cfelse>
            <
CFSET SQL SQL"OR ">
        </
cfif>    
        <
CFSET SQL SQL" name LIKE '%#form.member#%' " >
        <
CFSET SQL_Coubr >
    </
cfif>
    <
cfif form.Email neq  "">
        <
cfif SQL_Coubr eq  "0">
            <
CFSET SQL SQL"WHERE ">
        </
cfelse>
            <
CFSET SQL SQL"OR ">
        </
cfif>    
        <
CFSET SQL SQL" Email LIKE '%#form.Email#%' " >
        <
CFSET SQL_Coubr >
    </
cfif>
    <
cfif form.category neq  "">
        <
cfif SQL_Coubr eq  "0">
            <
CFSET SQL SQL"WHERE ">
        </
cfelse>
            <
CFSET SQL SQL"OR ">
        </
cfif>    
        <
CFSET SQL SQL"OR  category LIKE '%#form.category#%' " >
        <
CFSET SQL_Coubr >
    </
cfif>
    <
cfif form.ContractNumber neq  "">
        <
cfif SQL_Coubr eq  "0">
            <
CFSET SQL SQL"WHERE ">
        </
cfelse>
            <
CFSET SQL SQL"OR ">
        </
cfif>    
        <
CFSET SQL SQL"OR  ContractNumber LIKE '%#form.ContractNumber#%' " >
        <
CFSET SQL_Coubr >
    </
cfif
But it gives me a error that reads Context validation error for tag cfif.

Thanks for all the help