Ir para conteúdo

POWERED BY:

Arquivado

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

vinicius015

Problema

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,linksstrSQL = "SELECT * From tblCategory WHERE ref LIKE '"If Request.QueryString("ref") <> "" AND NOT IsEmpty(Request.QueryString("ref")) ThenstrSQL = strSQL & Request.QueryString("ref")End IfstrSQL = strSQL & "_' ORDER BY name;"set categorias = adoCon.Execute(strSQL)temp = 0If NOT categorias.EOF ThenResponse.Write "<hr width=""530px""><table class=""text"" cellpadding=""0"" cellspacing=""0"" width=""530px"" border=""0"" align=""center""><tr><td>"While NOT categorias.EOFtemp = temp + 3categorias.MoveNextWendcategorias.MoveFirstnum_itens = temp/5if num_itens < 5 Thennum_itens = 3End Iftemp = 1While NOT categorias.EOFif temp > num_itens ThenResponse.Write "</table></td><td>"temp = 1End IfIf temp = 1 ThenResponse.Write "<table border=""0"">"End IfResponse.Write "<tr><td><a href=""default.asp?ref=" & categorias("ref") & """>" & categorias("name") & "</a></td></tr>"temp = temp + 1categorias.MoveNextWendResponse.Write "</td></tr></table></td></tr></table><hr width=""530px"">"End IfIf Not IsEmpty(Request.QueryString("ref")) ThenResponse.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 databasersSearchResults.MoveNext'Loop back round NextEnd If'Close the HTML table displaying the resultsResponse.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 pagesIf intRecordPositionPageNum > 1 OR NOT rsSearchResults.EOF AND blnSearchWordLenthOK = True Then'Display an HTML table with links to the other search resultsResponse.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 pagesIf intRecordPositionPageNum > 1 or NOT rsSearchResults.EOF ThenResponse.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 pagesIf 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-linkIf intLinkPageNum = intRecordPositionPageNum ThenResponse.Write vbCrLf & " " & intLinkPageNumElseResponse.Write vbCrLf & "  <a href=""default.asp?PagePosition=" & intLinkPageNum & "&search=" & Server.URLEncode(strSearchKeywords) & "&mode=" & Request.QueryString("mode") & """ target=""_self"">" & intLinkPageNum & "</a>  " End IfNextEnd 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

Procura verificar a consistência dos na sua tabela....talvez seja isso manoww

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.