ciao

ho queste 3 tbl

cat: idcat,cat
colonie:id, nomi
repubblica:id,nomi

in pratica faccio la query ma nn mi trova risultati adatti a soddisfare la query.

qlk mi può dare una mano?pleaz?

posto:
codice:
<%@ Language=VBScript %> 
<% response.buffer=true %>
<% Server.ScriptTimeout = 300 %>


<html>
<head>
<title>Gestione archivio collezionismo</title>
<style type="text/css">
<!--
body {
	font-family: "Century Gothic";
	color: #000099;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<BODY LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">


</p>


  <div align="center"> </p> 
<TABLE WIDTH="672" CELLPADDING="4" CELLSPACING="4" BORDER="0" align="center">
  <TR height="60" valign="middle"> 
    <TD width="656" align="center"> <h1><font face="Century Gothic" size="6" color="red">Risultati 
        della ricerca</font></h1></TD>
  <TR> 
    <TD> <font face="Century Gothic"> 
      <%
			iPageSize = 10 'NUMERO RECORD PER PAGINA

			If Request.QueryString("page") = "" Then
				iPageCurrent = 1
			Else
				iPageCurrent = CInt(Request.QueryString("page"))
			End If



%>
      <%
	  nome = request.Form("nome")
      strSQL="select cat.*, colonie.*, repubblica.* FROM cat,colonie,repubblica WHERE (cat.cat='"& cat & "' and cat.idcat= '" & idcat & "') OR (colonie.nome='"& nome & "' and colonie.id= '" & id & "') OR (repubblica.nome='"& nome & "' and repubblica.id= '" & id & "')"

			Set objRS = Server.CreateObject("ADODB.Recordset")
			objRS.PageSize = iPageSize
			objRS.CacheSize = iPageSize
            objRS.Open strSQL, objConn, adOpenStatic, adLockReadOnly, adCmdText

			reccount = objRS.recordcount
			iPageCount = objRS.PageCount

			If iPageCurrent > iPageCount Then iPageCurrent = iPageCount
			If iPageCurrent < 1 Then iPageCurrent = 1

			If iPageCount = 0 Then
				Response.Write "

<table><td><font face='verdana' size='2' color='#000000'>Non sono stati trovati documenti corrispondenti.

<a href=index.asp>Torna alla ricerca</a></td></table></p>"
			Else
				objRS.AbsolutePage = iPageCurrent
				iRecordsShown = 0
				%>
      </font> <table cellpadding="0" cellspacing="0" border="0" width="100%">
        <tr> 
          <td height="47"> <table width="100%" height="48" border="0" cellpadding="2" cellspacing="1">
              <tr height="22"> 
                <td WIDTH="25%"><font face="Century Gothic" size="2" color="red">Id</font></td>
                <td WIDTH="36%"><font face="Century Gothic" size="2" color="red">Nome</font></td>
                <td WIDTH="21%" align="center"><font face="Century Gothic" size="2" color="red">Categoria</font></td>
              </tr>
              <%
								'SI VISUALIZZA IL CONTENUTO DELLA STRINGA SQL
								'ALL'INTERNO DELLA TABELLA PRIMA DEFINITA
								cont=1
								Do While iRecordsShown < iPageSize And Not objRS.EOF
									Dim Rig, bg
									Rig = Rig + 1
									If Rig Mod 2 = 0 then
									
									Else
											
									End if
									
										
									Response.Write "<tr bgcolor = " & bg & "><td><font color='#000000' face='Verdana' size='1'>" & (iPageSize*iPageCurrent)-iPageSize+Cont & "</font></td>"
 									Response.Write "<td><font color='#000000' face='Verdana' size='1'><a href='bolli.asp?categoria="& objRS("cat") &"'>" & objRS("nome") & "</font></td>"
									Response.Write "<td align=center> <font color='#000000' face='Verdana' size='1'> "& objRS("cat") & "</font></td>"
									
									Cont = Cont + 1
									'POSIZIONAMENTO ALLA RIGA SUCCESSIVA DEL DB
									iRecordsShown = iRecordsShown + 1
									objRS.MoveNext
								Loop
								'PULIZIA DEGLI OGGETTI ADO
								objRS.Close
								Set objRS = Nothing
								%>
            </table>
            <div align="right"></div></td>
        </tr>
      </table>
      <font face="Century Gothic"> 
      <%End if%>
      </font> 

 <font face="Century Gothic"> 
        <%If ipagecount <> 1 Then%>
        </font>
      <center>
        <table>
          <tr valign="middle"> 
            <td width="50%" align="center" valign="middle"><font face="Century Gothic" size="1" color="#000000"> 
              [ 
              <%if iPageCurrent-2 > 0 and iPageCurrent > 2 then%>
              [img]../images/first.gif[/img] 
              <%end if%>
              <%if iPageCurrent > 1 then%>
              [img]../images/pre.gif[/img] 
              <%end if%>
              <%if iPageCount > 2 then
								if iPageCurrent-2 < 1 then da_pag = 1 else da_pag = iPageCurrent-2
								if iPageCurrent+2 > iPageCount then fino_a_pag = iPageCount else fino_a_pag = iPageCurrent+2
							else
								da_pag = 1
								fino_a_pag = iPageCount
							end if%>
              <%for i = da_pag to fino_a_pag%>
              <%if i = iPageCurrent then%>
              <font color="red"><%=i%></font> 
              <%else%>
              <%end if%>
              <%next%>
              <%if iPageCurrent > 0 and iPageCurrent < iPageCount then%>
              [img]../images/next.gif[/img] 
              <%end if%>
              <%if iPageCurrent+1 < iPageCount then%>
              [img]../images/last.gif[/img] 
              <%end if%>
              ] </font></td>
          </tr>
          <tr> 
            <td colspan="2" align="center"><font face="verdana" size="1" color="#000000"> 
              <center>
                <font face="Century Gothic"> Pagina <font color="#FF0000"><%=iPageCurrent%></font></font> <font face="Century Gothic">di 
                <font color="#FF0000"><%=iPageCount%></font></font> 
              </center>
              </font></td>
          </tr>
        </table>
      </center>
      <font face="Century Gothic"> 
      <%end if%>
      <%
			objConn.Close
			Set objConn = Nothing
			%>
      </font></TD>
  </TR>
</TABLE>		


</p>


</p>
</body>
</html>