as Ian has mentioned, correct condition in your cfif should
be:
<cfif thumb eq ""> or <cfif len(trim(thumb))>
but why don't you rather select only those records in your
query that
have thumb to begin with? a lot more efficient to do it on db
level than
checking each row at output...
depending on db you use, the function to use to check the
length of
thumb column will be different. check you db manual for
correct function
to use. the following will work in MySQL db:
<cfquery name="coolpicx" ...>
SELECT thumb
FROM ...
WHERE projectID = ... AND LENGTH(TRIM(thumb)) > 0
</cfquery>
<!--- or you could use CHAR_LENGTH(TRIM(thumb)) > 0
--->
<!--- just remember that these are DB functions, NOT cf
functions! --->
that way your query will only select those records that do
have a value
for THUMB. and you won;t need to do any checking at output.
you can just do:
<cfoutput query="coolpicx">
<img
src="/crabweb1a/Images/CompleteProjectImages/completeThmbs/#thumb#"/>
</cfoutput>
<cfif coolpicx.recordcount is 0>
No images to display, sorry...
</cfif>
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/