[thelist] CF/SQL: Utterly Baffled!
Leo Wiedersheim
Leo.Wiedersheim at roxy.com
Tue, 18 Jan 2000 13:35:10 -0500
What database are you using? You might not be using the correct wildcard?
Leo.
~
Leo P. Wiedersheim, Jr.
leo@wiedersheim.com
http://www.Wiedersheim.com
http://www.CampaignCollectibles.com
-----Original Message-----
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