Ciao
ho reiniziato il "Progegetto" e voglio estrarre i dati da 3 TABELLE, ossia:
TabSuperCategoria
TabCategoria
TabAnagGiocatore
Ho creato la pagina supercategoriaA.asp nella quale estraggo tutte le SUPER CATEGORIE e dove sul campo NOME mi sono linkato alla pagina categoriaA.asp x estrarre le CATEGORIE della SUPER CATEGORIA:
http://www.pietracalcio.it/supercategoriaA.asp
---------------------------------------------------------
Il codice della pagina supercategoriaA.asp è questo:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
Dim rs_SuperCategoria
sql= "SELECT * FROM TabSuperCategoria"
Set rs_SuperCategoria = Server.CreateObject("ADODB.Recordset")
rs_SuperCategoria.Open sql, cn, 3,3
%>
<html>
<head></head>
<body>
<table border="1">
<%
While Not rs_SuperCategoria.eof
Response.Write("<tr>")
Response.Write("<td>")
Response.write ""&rs_SuperCategoria("ID_SUPER_CATEGORIA")&"
"
Response.Write("</td>")
Response.Write("<td>")
Response.Write ("" & (rs_SuperCategoria.Fields.Item("NOME").Value) & "")
Response.Write("</td>")
Response.Write("<td>")
Response.write ""&rs_SuperCategoria("CODICE_SUPER_CATEGORIA") &"
"
Response.Write("</td>")
Response.Write("</tr>")
rs_SuperCategoria.MoveNext
Wend
%>
<td
</table>
</body>
</html>
<%
rs_SuperCategoria.Close
Set rs_SuperCategoria = Nothing
cn.Close
Set cn = Nothing
%>
-----------------------------------------------------
Ora faccio fatica a capire come estrarre i valori delle CATEGORIE
Il codice della pagina categoriaA.asp è:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
Dim super_categoria_v, query_str_v
super_categoria_v = request.querystring("CODICE_SUPER_CATEGORIA")
rs_Categoria = "SELECT NOME FROM TabCategoria WHERE CODICE_CATEGORIA = '"& super_categoria_v &"'"
query_str_v = "SELECT NOME FROM TabCategoria WHERE CODICE_CATEGORIA = '"& super_categoria_v &"'"'Response.End()
Set rs_Categoria = Server.CreateObject("ADODB.Recordset")
rs_Categoria.Open query_str_v, cn, 3,3
%>
<html>
<head></head>
<body>
<%
While Not rs_Categoria.eof
Response.write ""&rs_Categoria("ID_CATEGORIA")&" - "&rs_Categoria("NOME")&" - "&rs_Categoria("CODICE_CATEGORIA")&" -
"
rs_Categoria.MoveNext
Wend
%>
</body>
</html>
<%
rs_Categoria.Close
Set rs_Categoria = Nothing
cn.Close
Set cn = Nothing
%>
----------------------------------
Puoi vedere dove sbaglio?