just never f**ked with verity before. that's all. plus, this will end up in a shared hosting environment, and its not that complex of searching going on...
that's all...but ill look into it, then also, look at looping through the list with space as the delimiter too!!! thanks guys! tony weeg sr. web applications architect navtrak, inc. [EMAIL PROTECTED] www.navtrak.net office 410.548.2337 fax 410.860.2337 -----Original Message----- From: Dave Carabetta [mailto:[EMAIL PROTECTED] Sent: Thursday, September 11, 2003 10:41 PM To: CF-Talk Subject: RE: count and strip words from string. > <cfset firstWordBreak = find(' ',search,1)> > > <cfif firstWordBreak> > <cfset secondWordBreak = find(' >',search,firstWordBreak)> > </cfif> > > <cfif isDefined("secondWordBreak") and secondWordBreak> > <cfset thirdWordBreak = find(' >',search,secondWordBreak)> > </cfif> > > <cfif isDefined("thirdWordBreak") and thirdWordBreak> > <cfset fourthWordBreak = find(' >',search,thirdWordBreak)> > </cfif> > >got it. > > >thats what ill do, then mid the strings out, and build the dynamic >query based on the presence of a 1st, 2nd, 3rd, or 4th word that may be >there, should i make them separate by commas, since st. anne would >return, st. joseph as well as many other possibilities, but if i make >them separate by commas, then ill be good, cause they will be >separating it themselves, and then i can just find commas....more >reliable i think. huh? > A few things: 1) You might be better off finding a different delimiter if you use your solution and are expecting search terms like "St. Anne's". 2) You'd probably be better off treating the search terms as a list with a space as a delimiter instead of the find() function, i.e.: SELECT myColumn FROM myTable WHERE 0 = 0 <cfloop list="#Form.searchTerms#" index="term" delimiter=" "> AND myColumn LIKE %#term#"% </cfloop> This way you don't have to worry about how many search terms are entered, which your proposed solution seems to be (i.e., "firstWordBreak", etc.) 3) Though not related to breaking up the search terms, why not use Verity? I think you'll find that the performance and accuracy of your results are enhanced by creating a collection that's populated by the results of a database query. Regards, Dave. _________________________________________________________________ Send and receive larger attachments with Hotmail Extra Storage. http://join.msn.com/?PAGE=features/es ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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

