
February 12th, 2004, 05:00 PM
|
|
Registered User
|
|
Join Date: Jan 2004
Location: england
Posts: 18
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
searching 2 fields for a keyword
hi,
I have a form into which you can type a keyword your searching for.When the request is sent to the database my actual application only queries one field.The field is called "title" as you can see below:
<% key=request.form("key")%>
<%sql="select * from users where title like '%"&key&"%'"%>
I want my request.form to not only find the keyword in "title" but also to look for it in another field of each record with the name lets say "title2". so do I just do:
<%sql="select * from users where title OR title2 like '%"&key&"%'"%> ?
cheers
|