I can't figure this post out either (what the original post was, what the ambiguous subject means...), but is someone looking for something that makes SQL out of search terms? I've got a copy of a custom tag (called boolsearch) that understands quoted phrases, NOTs, ANDs, ORs, etc., and makes a SQL filter out of it. AFAIK, this custom tag is generally unavailable, since I went looking for updates recently.
LMK if that's what you (or someone) needs. Jamie On Fri, 12 Sep 2003 14:45:54 -0400, in cf-talk you wrote: >thanks lee...looks like a good idea....i couldn't figure out what this >post was about...but now I see :) > >tony weeg >sr. web applications architect >navtrak, inc. >[EMAIL PROTECTED] >www.navtrak.net >office 410.548.2337 >fax 410.860.2337 > > >-----Original Message----- >From: [EMAIL PROTECTED] [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] >Sent: Friday, September 12, 2003 2:22 PM >To: CF-Talk >Subject: Another way > > >Treat the phrase/list of keywords coming in as a list: > ><cfset keywords = " help me now"> ><!--- assign to variable (TRIM! to remove lead/trailing spaces) ---> ><cfset searchPhrase = #trim(keywords)#> ><!--- replace all space/multiple spaces with comma [delimiter] ---> ><cfset searchPhrase = #REreplaceNoCase(searchPhrase, "[ ]+", ",", >"ALL")#> > ><!--- use this for your query to generate the Constraints ---> ><cfloop from="1" to="#listLen(searchPhrase)#" index="counter"> > AND columnName LIKE '%#listGetAt(searchPhrase,counter)#%' ></cfloop> > >This code will produce the following code: > >AND columnName LIKE '%help%' >AND columnName LIKE '%me%' >AND columnName LIKE '%now%' > >Use the listLen function to get number of keywords if you still need >that. > >Obviously, adjust the code for "OR" instead of "AND" etc, but you get >the idea. > > >>lets say, a user enters "skateboarding atlanta half-pipe" >>and you wanted to break that up into separate words, and know that >>there should be 3 "...or searchTerm like '%wordHere%'" sections in a >>query (one for each word) so that the user can search for >>"skateboarding or atlanta or >>half-pipe" through a sql statement. >> >>is this feasible, i know it has to be, just cant think past my keyboard > >>right now. >> >>thanks for any ideas.... >> >>....tony >> >>tony weeg >>[EMAIL PROTECTED] >>www.revolutionwebdesign.com >>rEvOlUtIoN wEb DeSiGn >>410.334.6331 >> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com

