Allora hai sbagliato forum...
ciò che vuoi fare è possibile lato client (con javascript) sostituendo il carattere "spazio" con il carattere "+"... che poi a che servirà proprio non lo capisco...
Utilizzando termini tecnici con appropriata proprietà di linguaggio aiuta a comprendere bene il problema... se ho sbagliato a darti la risposta nel post che richiami ( e che in qualche modo rinfacci...) è perchè proprio non si capisce che cosa vuoi realmente realizzare e certo non ho la palla di cristallo per poter indovinare...
Infine visto che sei anche un pò presuntuoso, eccoti un esempio di motore di ricerca senza fronzoli o sostituzioni incomprensibili:
codice:
<%
QueryString = Request.QueryString( "QueryString" )
QueryWords = Split( QueryString )
strIndent = ""
If QueryString = "" Then
Response.Redirect( "default.asp" )
End If
Session.timeout = 2
If IsObject(Session("sitesearch_conn")) Then
Set conn = Session("sitesearch_conn")
Else
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "sitesearch","",""
Set Session("sitesearch_conn") = conn
End If
sql = "SELECT * FROM [URLIndex] WHERE"
sql = sql & " ( [Description] LIKE '%" & QueryWords( 0 ) & "%'"
For i = LBound( QueryWords ) + 1 to UBound( QueryWords )
If QueryWords( i ) <> "" and UCase( QueryWords(i) ) <> "OR" and UCase( QueryWords(i) ) <> "AND" Then
If uCase( QueryWords( i-1 ) ) = "OR" Then
sql = sql & " OR [Description] LIKE '%" & QueryWords( i ) & "%'"
Else
sql = sql & " AND [Description] LIKE '%" & QueryWords( i ) & "%'"
End If
End If
Next
sql = sql & " ) OR ( [Keywords] LIKE '%" & QueryWords( 0 ) & "%'"
For i = LBound( QueryWords ) + 1 to UBound( QueryWords )
If QueryWords( i ) <> "" and UCase( QueryWords(i) ) <> "OR" and UCase( QueryWords(i) ) <> "AND" Then
If uCase( QueryWords( i-1 ) ) = "OR" Then
sql = sql & " OR [Keywords] LIKE '%" & QueryWords( i ) & "%'"
Else
sql = sql & " AND [Keywords] LIKE '%" & QueryWords( i ) & "%'"
End If
End If
Next
sql = sql & " ) OR ( [Title] LIKE '%" & QueryWords( 0 ) & "%'"
For i = LBound( QueryWords ) + 1 to UBound( QueryWords )
If QueryWords( i ) <> "" and UCase( QueryWords(i) ) <> "OR" and UCase( QueryWords(i) ) <> "AND" Then
If uCase( QueryWords( i-1 ) ) = "OR" Then
sql = sql & " OR [Title] LIKE '%" & QueryWords( i ) & "%'"
Else
sql = sql & " AND [Title] LIKE '%" & QueryWords( i ) & "%'"
End If
End If
Next
sql = sql & " ) OR ( [Summary] LIKE '%" & QueryWords( 0 ) & "%'"
For i = LBound( QueryWords ) + 1 to UBound( QueryWords )
If QueryWords( i ) <> "" and UCase( QueryWords(i) ) <> "OR" and UCase( QueryWords(i) ) <> "AND" Then
If uCase( QueryWords( i-1 ) ) = "OR" Then
sql = sql & " OR [Summary] LIKE '%" & QueryWords( i ) & "%'"
Else
sql = sql & " AND [Summary] LIKE '%" & QueryWords( i ) & "%'"
End If
End If
Next
sql = sql & " )"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 3, 3
Response.Write "
QueryString: " & QueryString
Response.Write "
Query Words: "
For i = LBound( QueryWords ) to UBound( QueryWords )
Response.Write "
" & strIndent & i & ": " & QueryWords( i )
Next
Response.Write "
SQL String : " & sql
Response.Write "
Results: <UL>"
On Error Resume Next
rs.MoveFirst
Do While Not rs.eof
Response.Write "
" & "" & rs.Fields("Title") & " - "
Response.Write rs.Fields("Description") & "
"
Response.Write "<FONT SIZE=2>URL: " & rs.Fields("URL") & "</FONT>"
Response.Write "<HR SIZE=1 WIDTH=200 ALIGN=LEFT>"
rs.MoveNext
Loop
Response.Write "[/list]"
%>