- see footer for list info -<
<cfset getSchools = QueryNew("area","VarChar")>
<cfset queryAddRow(getSchools)>
<cfset querySetCell(getSchools,"area","Blah Blah")>
<cfswitch expression="#Trim(getSchools.Area)#">
<cfcase value="Blah Blah">
Foobar
</cfcase>
...
<cfdefaultcase>
#getSchools.Area#<br>
<cfif getSchools.Area EQ "Blah Blah">
good
<cfelse>
bad
</cfif>
</cfdefaultcase>
</cfswitch>
also produces 'Foobar'
????
On 6/22/06, Michael Traher <[EMAIL PROTECTED]> wrote:
<cfset getSchools.Area = "Blah Blah">
<cfswitch expression="#Trim(getSchools.Area)#">
<cfcase value="Blah Blah">
Foobar
</cfcase>
...
<cfdefaultcase>
#getSchools.Area#<br>
<cfif getSchools.Area EQ "Blah Blah">
good
<cfelse>
bad
</cfif>
</cfdefaultcase>
</cfswitch>
I realise your getSchools is probably a query but the above code returns
'Foobar'
Can you put <cfdump var="#getSchools#">
before the switch?
On 6/22/06, Duncan Cumming <[EMAIL PROTECTED]> wrote:
>
> >- see footer for list info -<
> Anyone spot what's wrong here? The value being passed to <cfswitch> is
> 'Blah Blah' (names changed to protect the innocent), but it doesn't get
> picked up by the <cfcase>. Other cfcases for different values all work
> fine. The <cfif> returns 'good', so there is a string match. I've even
> tried dumping the ascii values of every character in the string in case
> there were any hidden high ascii values or something, but that's not the
> case.
>
> <cfswitch expression="#Trim(getSchools.Area)#">
> <cfcase value="Blah Blah">
> Foobar
> </cfcase>
> ...
> <cfdefaultcase>
> #getSchools.Area#<br>
> <cfif getSchools.Area EQ "Blah Blah">
> good
> <cfelse>
> bad
> </cfif>
> </cfdefaultcase>
> </cfswitch>
>
> Duncan Cumming
> New Media Developer
> Customer Relations Management / Education
> Fife Council
> 700 4105 / 01592 414105
>
>
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they are
> addressed and should not be disclosed to any other party.
> If you have received this email in error please notify your system
> manager and the sender of this message.
>
> This email message has been swept for the presence of computer viruses
> but no guarantee is given that this e-mail message and any attachments are
> free from viruses.
>
> Fife Council
> Tel: 08451 55 00 00
> ************************************************
>
> _______________________________________________
>
> For details on ALL mailing lists and for joining or leaving lists, go to
> http://list.cfdeveloper.co.uk/mailman/listinfo
>
> --
> CFDeveloper Sponsors:-
> >- Hosting provided by www.cfmxhosting.co.uk -<
> >- Forum provided by www.fusetalk.com -<
> >- DHTML Menus provided by www.APYCOM.com -<
> >- Lists hosted by www.Gradwell.com -<
> >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help
> -<
>
--
Mike T
Blog http://www.socialpoints.com/
--
Mike T
Blog http://www.socialpoints.com/
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<