Click to See Complete Forum and Search --> : replace space in searchengine


gerjan
05-26-2003, 08:49 AM
Hello,

I wrote a search script. It works fine when I just type 1 word to search for.
But when I type 2 words or more I get an 'exeption occured'.
I think I know the sollution in a way, but I don't know how to write this down.

It must be something like this, I think:

keyword = Replace(keyword,valuespace,"AND")

Valuespace must have a "value"
i.e. vbcrlf is an enter!

Tnx in advange:D

gerjan
05-26-2003, 10:31 AM
I didn't felt this stupid before :(

Unfortualy I have now another problem.
The AND method doesn't work in the string:

sqstring = "SELECT * FROM activiteiten WHERE kop LIKE '%"& keyword &"%' or meer LIKE '%"& keyword &"%'"

if for example keyword = value1 AND value2,
I believe the sqstring thinks that "value1 AND value2 is one word??
Does anyone know how let sqstring know it are two seperate words that must be both in "kop" and "meer"?

sqstring = "SELECT * FROM activiteiten WHERE kop LIKE '%"& value1 AND value2&"%' or meer LIKE '%"& value1 AND value2 &"%'"