Hey all, I have a question that is probably a bit of a basic list question.
I am doing a search kind of situation, and I'm trying to make it a little
intelligent. Basically, if there are quotes, search for literal matches, if
not, check for spaces. That kind of thing.
Well, my question is, if they enter "word1 word2" word3, then it searches
for that last word with a space in front of it, so it finds nothing.
How do I remove that space? So that it searches for "word1 word2" and
then for "word3"?
What I have so far is
<cfif #left('#keyword#',1)# is '"'>
<cfquery>
<!-- Query stuff in here --->
where <cfloop list="#keyword#" index="keywords" delimiters='"'> name LIKE
'%#keywords#%' or</cfloop> 0=1
</cfquery>
Stuart D.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.