Avatar of pigmentarts
pigmentarts
Flag for United Kingdom of Great Britain and Northern Ireland asked on

cf ListAppend?

hi, hope someone can help me on this...


this pull out all my words...

<cfloop index="i" list="#subject#" delimiters=" .,?!:<>">
                         <cfif Len(i) GT 3>
                               <cfif listFindNoCase(goodlist, i) eq 0>
                                <cfset goodlist = ListAppend(goodlist, "%#i#%' OR subject LIKE '", " ") />
                                </cfif>
                         </cfif>
                  </cfloop>

goodlist is now this...
'%What%' OR subject LIKE ' %methodology%' OR subject LIKE '

i want to now take my words and search...

SELECT *
FROM articles
WHERE subject LIKE '#goodlist#'

but as you can see the sql is wrong, i get one too many OR subject LIKE and at the end 2x '

anh help to make the string vailed sql?
Web Servers

Avatar of undefined
Last Comment
pigmentarts

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
js_vaughan

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
pigmentarts

ASKER
thanks
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes