Con questo codice dovrei creare il calendario di un campionato mettendo 3 giornate diverse su ogni riga.
Il problema e che mi ripete la stessa giornata su ogni riga.
Come devo fare ?
codice:strsql = "SELECT distinct str_giornata FROM tb_Calendari WHERE str_stagione=2 ORDER BY str_giornata" objRs.Open strsql, objConn Response.Write "<table width=""555"" cellpadding=""0"" cellspacing=""0"" border=""1"">"&vbCrlf Do While Not objRs.Eof Response.Write"<tr>"&vbCrlf Dim i i = 0 For i=0 to 4 Response.Write"<td>" '------------------ Response.Write "<table width=""99%"" border=""0"" align=""center"" cellpadding=""1"" cellspacing=""1"" class=""bodyline"">" 'apro un nuovo recordset strSql1="SELECT c.*,a.str_squadra as A, b.str_squadra as B FROM tb_calendari as c,tb_squadre as a,tb_squadre as b WHERE a.str_squadra=(SELECT str_squadra FROM tb_squadre WHERE id_squadra=c.str_squadra_A) AND b.str_squadra=(SELECT str_squadra from tb_squadre where id_squadra=c.str_squadra_B) AND c.str_stagione="&Strseason&" AND c.Str_giornata="&objRs("str_giornata")&" ORDER BY a.str_squadra" Set objRs1 = Server.CreateObject("ADODB.Recordset") objRs1.Open strSql1, objConn,3,3 Response.Write"<tr>"&vbCrlf Response.Write"<td colspan=""2"" ><span class=""nero10"">"&objRs1("str_giornata")&"° Giornata - "&(FormatDateTime(objRs1("str_data"), vbLongDate))&"</span></td>"&vbCrlf Response.Write"</tr>"&vbCrlf do while not objRs1.Eof Response.Write"<tr>"&vbCrlf if ObjRs1("A") = "MIASQUADRA" OR ObjRs1("B") = "MIASQUADRA" then Response.Write"<td width=""70%"" class="""&StrClass&"""><span class=""rosso"">"&ObjRs1("A")&"-"&ObjRs1("B")&"</span></td>"&vbCrlf else Response.Write"<td width=""70%"" class="""&StrClass&""">"&objRs1("A")&"-"&ObjRs1("B")&"</td>"&vbCrlf end if Response.Write"<td align=""center"" class="""&StrClass&""">"&objRs1("str_gol_A")&"-"&objRs1("str_gol_B")&"</td>"&vbCrlf Response.Write"</tr>"&vbCrlf objRs1.movenext Loop objRs1.close Set objRs1 = Nothing Response.Write "</table>"&vbCrlf '------------------ Response.Write"</td>"&vbCrlf i = i+1 next Response.Write"</tr>"&vbCrlf objRs.MoveNext Loop Set objRs = Nothing Response.Write "</table>"&vbCrlf

Rispondi quotando
