Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

vinicius015

para vcs.,. para mim nao.. rsrrss

Recommended Posts

Iae galera beleza, eu tenho um sitema de busca... ele fununcia normal.. mas quando eu vo pesquisar nomes com palavras de 1 ou 2 algarismos, ele no aparece o resultado... melhor ele queima a pesqisa por causa desses algarismos... por exemplo;um nome de um bairro PARQUE DO CARMO, se eu procurar como esta escirto ai corretamente ele nao acaha o resultado, para poder achar eu tenho que escrver PARQUE CARMO, o mesmo acontece, quando utilizo número... tipo 1 ou 2 algarismos numericos.-------------------------------------- AI VA O CODIGO... VALEWIf Request.QueryString("mode") = "" OR IsEmpty (Request.QueryString("mode")) Then Dim categorias,temp,num_itens,links strSQL = "SELECT * From tblCategory WHERE ref LIKE '" If Request.QueryString("ref") <> "" AND NOT IsEmpty(Request.QueryString("ref")) Then strSQL = strSQL & Request.QueryString("ref") End If strSQL = strSQL & "_' ORDER BY name;" set categorias = adoCon.Execute(strSQL) temp = 0 If NOT categorias.EOF Then Response.Write "<hr width=""530px""><table class=""text"" cellpadding=""0"" cellspacing=""0"" width=""530px"" border=""0"" align=""center""><tr><td>" While NOT categorias.EOF temp = temp + 3 categorias.MoveNext Wend categorias.MoveFirst num_itens = temp/5 if num_itens < 5 Then num_itens = 3 End If temp = 1 While NOT categorias.EOF if temp > num_itens Then Response.Write "</table></td><td>" temp = 1 End If If temp = 1 Then Response.Write "<table border=""0"">" End If Response.Write "<tr><td><a href=""default.asp?ref=" & categorias("ref") & """>" & categorias("name") & "</a></td></tr>" temp = temp + 1 categorias.MoveNext Wend Response.Write "</td></tr></table></td></tr></table><hr width=""530px"">" End If If Not IsEmpty(Request.QueryString("ref")) Then Response.Write "<span class=""text""></span><br>" strSQL = "SELECT * From tblWebsites WHERE category = '" & Request.QueryString("ref") & "' ORDER By Rating DESC, No_of_ratings DESC, Hits DESC ;" set rsSearchResults = adoCon.Execute(strSQL) Response.Write vb script:window.open('get_url.asp?SiteID=" & CInt(rsSearchResults("SiteIDNo")) & "', 'RESULTADO', 'width=800,height=600, menubar=0, statusbar=0');"">" & rsSearchResults("Title") & "</a>" Response.Write vb script:window.open('get_url.asp?SiteID=" & CInt(rsSearchResults("SiteIDNo")) & "', 'RESULTADO', 'width=800,height=600, menubar=0, statusbar=0');"">" & rsSearchResults("Title") & "</a>" Response.Write vbCrLf & " <br>" Response.Write vbCrLf & " " & rsSearchResults("Description") Response.Write vbCrLf & " <br>" Response.Write vbCrLf & " <span class=""italic""<a href=" & "','rate_site')"" style=""font-size:" & intTextSize-1 & "; font-style: italic;""></a>- Nº. de Visitas :  " & CInt(rsSearchResults("Hits")) & """</span>" Response.Write vbCrLf & " <br><br>" 'Move to the next record in the database rsSearchResults.MoveNext 'Loop back round Next End If 'Close the HTML table displaying the results Response.Write vbCrLf & " </td>" Response.Write vbCrLf & " </tr>" Response.Write vbCrLf & " </table>" 'If there are more pages to display then add a title to the other pages If intRecordPositionPageNum > 1 OR NOT rsSearchResults.EOF AND blnSearchWordLenthOK = True Then 'Display an HTML table with links to the other search results Response.Write vbCrLf & " <table width=""530x"" border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"">" Response.Write vbCrLf & " <tr>" Response.Write vbCrLf & " <td>" Response.Write vbCrLf & " <table width=""530px"" border=""0"" cellpadding=""0"" cellspacing=""0"">" Response.Write vbCrLf & " <tr>" Response.Write vbCrLf & " <td width=""530px"" align=""center"" class=""text"">" 'If there are more pages to display then add a title to the other pages If intRecordPositionPageNum > 1 or NOT rsSearchResults.EOF Then Response.Write vbCrLf & " Resultadosde Páginas:  " End If 'If the page number is higher than page 1 then display a back link If intRecordPositionPageNum > 1 Then Response.Write vbCrLf & " <a href=""default.asp?PagePosition=" & intRecordPositionPageNum - 1 & "&search=" & Server.URLEncode(strSearchKeywords) & "&mode=" & Request.QueryString("mode") &""" target=""_self""><< Anterior</a>  " End If 'If there are more pages to display then display links to all the search results pages If intRecordPositionPageNum > 1 or NOT rsSearchResults.EOF Then 'Loop to diplay a hyper-link to each page in the search results For intLinkPageNum = 1 to lngTotalNumPages 'If the page to be linked to is the page displayed then don't make it a hyper-link If intLinkPageNum = intRecordPositionPageNum Then Response.Write vbCrLf & " " & intLinkPageNum Else Response.Write vbCrLf & "  <a href=""default.asp?PagePosition=" & intLinkPageNum & "&search=" & Server.URLEncode(strSearchKeywords) & "&mode=" & Request.QueryString("mode") & """ target=""_self"">" & intLinkPageNum & "</a>  " End If Next End If 'If it is Not the End of the search results than display a next link If NOT rsSearchResults.EOF then Response.Write vbCrLf & "  <a href=""default.asp?PagePosition=" & intRecordPositionPageNum + 1 & "&search=" & Server.URLEncode(strSearchKeywords) & "&mode=" & Request.QueryString("mode") & """ target=""_self"">Próxima >></a>" End If 'Finsh HTML the table Response.Write vbCrLf & " </td>" Response.Write vbCrLf & " </tr>" Response.Write vbCrLf & " </table>" Response.Write vbCrLf & " </td>" Response.Write vbCrLf & " </tr>" Response.Write vbCrLf & " </table>" Response.Write vbCrLf & " <br>" End If End If'Close Server Objects Set rsSearchResults = NothingSet strCon = NothingSet adoCon = Nothing----------------------------------------------------------------------------------------- VALEW GALERA ESPERO A SOLUCION....ESTOU ENCURRALADO COM ISSO...YYYYYYYEEEEEESSSSSSSSSSS!!!!VINICIUS

Compartilhar este post


Link para o post
Compartilhar em outros sites

como eh passado o valor do nome do bairro

Compartilhar este post


Link para o post
Compartilhar em outros sites

Eu adiciono um tópco a ser pesquisado, do seguinte modo,

com as seguintes palavras chaves;

ZONA LESTE PARQUE DO CARMO

 

só que se eu digito as palavras chaves exatas, como esta escrito acima, nao funciona.

Para fncionar eu tenho que escrveer assim

ZONA LESTE PARQUE CARMO - sem o DO

 

se eu escrevo o DO entre a palavra PARQUE e CARMO, ele NÃO mostra resultado que eu adicionei,

 

acho que tem alguma coisa no codigo fonte que anula a pesquisa, se possuir somente 2 ou menos algarismos na pesquisa.

VALEW

Compartilhar este post


Link para o post
Compartilhar em outros sites

antes da linha de execução da consulta...

set categorias = adoCon.Execute(strSQL)
coloque

response.write strSQLresponse.flush
e informe a SQL q sai na tela... ai fica mais fácil pra alguem te ajudar, ok...

 

;)

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.