[thelist] ColdFusion MX and CFIF notation

.jeff jeff at members.evolt.org
Thu Nov 21 04:22:01 CST 2002


ben,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Ben Dyer
>
> In ColdFusion 5, this:
>
>    <CFIF Whatever.RecordCount>
>
> used to be the equivalent of:
>
>    <CFIF Whatever.RecordCount GT 0>
>
> However, in ColdFusion MX, this no longer appears to be
> the case.  The exact opposite appears to be true.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

not in any case i've ever tried.  mx upholds the same boolean logic -- 0
equals false and any other number (positive or negative) means true.

i suspect there is something else going on with your query.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> Does MX change this rule so that <CFIF
> Whatever.RecordCount> is checking for the existence of
> the variable, rather than a non-zero value of that
> variable?
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

that would be a ridiculous change to make to coldfusion code execution.

again, check your query.  dump it so you can see what your query is
producing.  i suspect it's either returning at least one record when you
expect it not to or it's not returning any records when you think it should
be.

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/




More information about the thelist mailing list