[thelist] adding modules to EAPI Apache?

Joshua Olson joshua at alphashop.net
Wed Sep 12 20:44:16 CDT 2001


<tip type="ColdFusion" author="Joshua Olson">
Ever wanted to check your query results for a single non-zero non-NULL value
so that you can determine whether or not to display something?

Normally, you would have to do something like this:

<cfset has_some = "0">

<cfloop query="myquery">
  <cfif Val(myquery.myval)>
     <cfset has_some = "1">
  </cfif>
</cfloop>

<cfif has_some>
  ... whatever ...
</cfif>

Did you know you can also try this?

<cfif Val(Replace(ValueList(myquery.myval), ",", "", "ALL"))>
  ... whatever ...
</cfif>

</tip>





More information about the thelist mailing list