Hi,

Im having a tiny problem with delimiters in a CFLOOP statement.

The problem is directly out of Ben Forta's book in CF, Third Edition,
Page 519, of "The ColdFusion Application Construction Kit".  

The LINE I'm having a problem with is the follow at the top of
519 in the code snippet.

<!--LOOP through the words-->
<CFLOOP INDEX="word" LIST="#search_for#" DELIMITERS=" ">
<!-- Add the AND clause -->
  AND Title LIKE '%#word#%'
</CFLOOP>

My code is somewhat similar to this loop where only the variable
names of changed....like so:

<!--LOOP through the words-->
<CFLOOP INDEX="word" LIST="#search_string#" DELIMITERS=" ">
<!-- Add the AND clause -->
  AND ft_subject LIKE '#word#%'
</CFLOOP>

The problem child is the DELIMITER equaling a " ".

If I leave the line as is...and then run the code, entering two words like
"web agent" I get an error on the word AGENT, with CF telling me
that its trying to process the word AGENT as a column name,
which tells me that the CFLOOP DELIMITER of a space ISN'T 
working.  Further proof of this is that when I run the same code
but change the delimiter to equal a "+", and then re-enter the same
search "web+agent"...it works just fine!  This proves that the
delimiter of a space DOESN'T work.  OR that I can't follow
simple instructions and that I couldn't code my way out of a
wet paper bag.

Any suggestions, aside from getting a dry paper bag ?

Miles.
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to