CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Search in CC with more than one word

Print topic Send  topic

Author Message
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.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.