mkmind
|
| Posted: 03/21/2003, 4:24 AM |
|
Hello.
How can i make a searchengine in CC that looks for each word that is make in the seachbox.
Where 1.word %..% OR 2.word %..% ... and so on.
Sorry about my english
martin from germany
|
|
|
 |
bsiler
|
| Posted: 03/23/2003, 12:22 PM |
|
Here is some code I have used in the past.
searchsql=""
xsearchword=request("userword")
xsearch=split(xsearchword," ")
'the search field name for example DESCRIPTION
for i=0 to ubound(xsearch)
searchsql=searchsql&" description like '% "&xsearch(i)&" %' "
if i<> ubound(xsearch) then
searchsql=searchsql&" or "
end if
next
STRSQL="select * from table where "&searchsql
'then execute querry
(let me know is it worked or not)
Also a good FAQ on this can be found at:
http://www.programmersresource.com/articles/dynamicsql.asp
|
|
|
 |
bsiler
|
| Posted: 03/23/2003, 12:22 PM |
|
Here is another link for a Javascript that will do exactly what you want.
http://www.htmlgoodies.com/tutors/jsdb.html
you can also download the script for free.
|
|
|
 |
|