Nick,

Thanks a bunch. I figured there was a technique like this, but I just
couldn't find it. As it turned out, I figured another route to the same
thing. Who is it who's famed for saying, "On the other hand, you could
try..."? Dave?

I simply added:

        OR
        lcase(FN + ' ' + LN) LIKE '%#lcase(SearchText)#%'

to the WHERE clause of my query. 

Thanks for the help. I'll hang on to this one for future reference.

--John


Nick Slay wrote:
> 
> Hi John,
> 
> You can split out the words from the entry field using lists, for example:
> 
> <CFIF ListLen(EntryField, " ") GT 1>
>          <CFSET FirstName = ListFirst(EntryField, " ")>
>          <CFSET LastName = ListLast(EntryField, " ")>
> <CFELSE>
>          <CFSET Name = #Form.EntryField#>
> </CFIF>
> 
> Nick
> 
> At 14:02 15/05/00 -0500, you wrote:
> >I have a field, (Person), in a form which will search according to the
> >following criteria:
> >
> >WHERE   <CFIF #Person# IS NOT "">
> >         lcase(FN) LIKE '%#lcase(Person)#%' OR
> >         lcase(LN) LIKE '%#lcase(Person)#%' OR
> >         lcase(Real_Name) LIKE '%#lcase(Person)#%'
> >         </cfif>
> >
> >I don't have the first and last names combined anywhere in my database,
> >and unless I have users enter names in separate first and last name
> >entry fields (which I'd rather not do), they WILL put both names in the
> >search field. This, of course, won't work.
> >
> >I've RTFM, but I can't figure how to either split out the words in the
> >entry field, or combine two of my database fields within the WHERE
> >clause of my query.
> >
> >Has anyone done something like this? Any help appreciated.
> >
> >--John
> >------------------------------------------------------------------------------
> >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.
> 
> ------------------------------------------------------------------------------
> 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.

-- 
John Allred / Jackson, Mississippi
Webmaster, Mississippi Counties
http://www.mscounties.com/
------------------------------------------------------------------------------
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.

Reply via email to