[thelist] CF/SQL: Utterly Baffled!
Frank
framar at interlog.com
Tue, 18 Jan 2000 13:32:31 -0500
I'm trying to compose a query whereby as user can type in various
partial strings in their respective fields, and get intelligent
answers back. Typical website usage.
For the life of me, I can't get this to work unless they are
*exactly* on the mark (ie, no partials) or anything gets returned, or
nothing gets returned.
Here's an example of what I want
Search form:
First name j
Last Name roc
City tor
Prov on
Would return
Joe, Rockhead, Toronto, Ontario. or
Jane, Rocci, Tornado City, Ongo Bongo
Here's what I've got
<cfquery name="theName" datasource="theTable">
select id, nameFirst, nameLast, etc...
from theTable
where
nameFirst like #form.nameFirst#
(...etc...)
(...etc...)
(...etc...)
</cfquery>
Where oh where am I going wrong?
--
Frank Marion,
Loofah Communications;
framar@interlog.com
http://www.loofahcom.com