dimanche 3 juin 2018

COLDFUSION 9 set fix variable and rename the output

I'm trying to set fix variable after searching (egg.):'BCT787' and give an cfoutput depend of the results. If it matched the output should be renamed as "INFORMATION AVAILABLE" if not as "NO MATCH".

What i tried:

<cfparam name="stat" type="string" default="" />


<cfif stat EQ "">
    <cfset stat = "Information available"/>

<cfquery name="test1" datasource="tes" type="string">
select resp from t_test x where serv= 'BCT787' 
and resp Like ('%OK%')
</cfquery>

else 

    <cfset stat = "no match"/>
</cfif>


<td><cfouput>avaimatch.stat</cfouptput</td>

If matched i should get -> INFORMATION AVAILABLE If not -> NO MATCH

It is not working could someone please help me and tell me what is wrong or what is missing? Thank you for your help and support

Aucun commentaire:

Enregistrer un commentaire