Ir para conteúdo

POWERED BY:

Arquivado

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

cleberdemiranda

Soma de campo (Sum) retorna vazio no DW

Recommended Posts

A soma de um campo esta retornando vazio no Dreamweaver, porém usando o SQL do phpmyadmin, a soma ocorre, oq seria?

 

SELECT (Sum(Gol1ID) + Sum(Gol2ID)) AS Gols, Rodada, realizado

FROM corumbaonline2.jogos

WHERE realizado = 'S' GROUP BY Rodada

 

Eu preciso da soma dos gols da rodada, então, somo os gols das partidas utilizando a clausula where para distinguir as rodadas.

 

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../Connections/Corumbaonline2.asp" -->
<%
Dim GrupoA
Dim GrupoA_cmd
Dim GrupoA_numRows

Set GrupoA_cmd = Server.CreateObject ("ADODB.Command")
GrupoA_cmd.ActiveConnection = MM_Corumbaonline2_STRING
GrupoA_cmd.CommandText = "SELECT NomeAbrevia, Grupo, Pontos, Jogos, Vitorias, Empates, Derrotas, Golspro, Golscontra, Saldodegols, Aproveita FROM clubes WHERE Grupo = 'Grupo A' ORDER BY Pontos DESC, Vitorias DESC, Saldodegols DESC, Golspro DESC" 
GrupoA_cmd.Prepared = true

Set GrupoA = GrupoA_cmd.Execute
GrupoA_numRows = 0
%>
<%
Dim GrupoB
Dim GrupoB_cmd
Dim GrupoB_numRows

Set GrupoB_cmd = Server.CreateObject ("ADODB.Command")
GrupoB_cmd.ActiveConnection = MM_Corumbaonline2_STRING
GrupoB_cmd.CommandText = "SELECT NomeAbrevia, Grupo, Pontos, Jogos, Vitorias, Empates, Derrotas, Golspro, Golscontra, Saldodegols, Aproveita FROM clubes WHERE Grupo = 'Grupo B' ORDER BY Pontos DESC, Vitorias DESC, Saldodegols DESC, Golspro DESC" 
GrupoB_cmd.Prepared = true

Set GrupoB = GrupoB_cmd.Execute
GrupoB_numRows = 0
%>
<%
Dim Rodadas__MMColParam
Rodadas__MMColParam = "S"
If (Request("MM_EmptyValue") <> "") Then 
Rodadas__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
Dim Rodadas
Dim Rodadas_cmd
Dim Rodadas_numRows

Set Rodadas_cmd = Server.CreateObject ("ADODB.Command")
Rodadas_cmd.ActiveConnection = MM_Corumbaonline2_STRING
Rodadas_cmd.CommandText = "SELECT * FROM corumbaonline2.jogos WHERE realizado = ? ORDER BY Rodada DESC, data DESC" 
Rodadas_cmd.Prepared = true
Rodadas_cmd.Parameters.Append Rodadas_cmd.CreateParameter("param1", 200, 1, 255, Rodadas__MMColParam) ' adVarChar

Set Rodadas = Rodadas_cmd.Execute
Rodadas_numRows = 0
%>
<%
Dim OutrosJogos__MMColParam
OutrosJogos__MMColParam = "N"
If (Request("MM_EmptyValue") <> "") Then 
OutrosJogos__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
Dim OutrosJogos
Dim OutrosJogos_cmd
Dim OutrosJogos_numRows

Set OutrosJogos_cmd = Server.CreateObject ("ADODB.Command")
OutrosJogos_cmd.ActiveConnection = MM_Corumbaonline2_STRING
OutrosJogos_cmd.CommandText = "SELECT * FROM corumbaonline2.jogos WHERE realizado = ? GROUP BY data ORDER BY Data" 
OutrosJogos_cmd.Prepared = true
OutrosJogos_cmd.Parameters.Append OutrosJogos_cmd.CreateParameter("param1", 200, 1, 3, OutrosJogos__MMColParam) ' adVarChar

Set OutrosJogos = OutrosJogos_cmd.Execute
OutrosJogos_numRows = 0
%>
<%
Dim corumbaultimo
Dim corumbaultimo_cmd
Dim corumbaultimo_numRows

Set corumbaultimo_cmd = Server.CreateObject ("ADODB.Command")
corumbaultimo_cmd.ActiveConnection = MM_Corumbaonline2_STRING
corumbaultimo_cmd.CommandText = "SELECT * FROM corumbaonline2.jogos WHERE realizado ='S' and Time1No = 'Corumbaense' or Time2no = 'Corumbaense' ORDER BY Data DESC" 
corumbaultimo_cmd.Prepared = true

Set corumbaultimo = corumbaultimo_cmd.Execute
corumbaultimo_numRows = 0
%>
<%
Dim corumbaproximo
Dim corumbaproximo_cmd
Dim corumbaproximo_numRows

Set corumbaproximo_cmd = Server.CreateObject ("ADODB.Command")
corumbaproximo_cmd.ActiveConnection = MM_Corumbaonline2_STRING
corumbaproximo_cmd.CommandText = "SELECT * FROM corumbaonline2.jogos WHERE realizado = 'N' and Time1No = 'Corumbaense' or Time2no = 'Corumbaense' ORDER BY Data DESC" 
corumbaproximo_cmd.Prepared = true

Set corumbaproximo = corumbaproximo_cmd.Execute
corumbaproximo_numRows = 0
%>
<%
Dim pantanalultimo
Dim pantanalultimo_cmd
Dim pantanalultimo_numRows

Set pantanalultimo_cmd = Server.CreateObject ("ADODB.Command")
pantanalultimo_cmd.ActiveConnection = MM_Corumbaonline2_STRING
pantanalultimo_cmd.CommandText = "SELECT * FROM corumbaonline2.jogos WHERE realizado ='S' and Time1No = 'Pantanal' or Time2no = 'Pantanal' ORDER BY Data DESC" 
pantanalultimo_cmd.Prepared = true

Set pantanalultimo = pantanalultimo_cmd.Execute
pantanalultimo_numRows = 0
%>
<%
Dim pantanalproximo
Dim pantanalproximo_cmd
Dim pantanalproximo_numRows

Set pantanalproximo_cmd = Server.CreateObject ("ADODB.Command")
pantanalproximo_cmd.ActiveConnection = MM_Corumbaonline2_STRING
pantanalproximo_cmd.CommandText = "SELECT * FROM corumbaonline2.jogos WHERE realizado = 'N' and Time1No = 'Pantanal' or Time2no = 'Pantanal' ORDER BY Data DESC" 
pantanalproximo_cmd.Prepared = true

Set pantanalproximo = pantanalproximo_cmd.Execute
pantanalproximo_numRows = 0
%>
<%
Dim Estatistica
Dim Estatistica_cmd
Dim Estatistica_numRows

Set Estatistica_cmd = Server.CreateObject ("ADODB.Command")
Estatistica_cmd.ActiveConnection = MM_Corumbaonline2_STRING
Estatistica_cmd.CommandText = "SELECT (Sum(Gol1ID) + Sum(Gol2ID)) AS Gols, Rodada, realizado FROM corumbaonline2.jogos WHERE realizado = 'S' GROUP BY Rodada" 
Estatistica_cmd.Prepared = true

Set Estatistica = Estatistica_cmd.Execute
Estatistica_numRows = 0
%>
<%
Dim Repeat2__numRows
Dim Repeat2__index

Repeat2__numRows = -1
Repeat2__index = 0
GrupoB_numRows = GrupoB_numRows + Repeat2__numRows
%>
<%
Dim Repeat3__numRows
Dim Repeat3__index

Repeat3__numRows = -1
Repeat3__index = 0
Rodadas_numRows = Rodadas_numRows + Repeat3__numRows
%>
<%
Dim Repeat5__numRows
Dim Repeat5__index

Repeat5__numRows = -1
Repeat5__index = 0
Estatistica_numRows = Estatistica_numRows + Repeat5__numRows
%>
<%
Dim Repeat4__numRows
Dim Repeat4__index

Repeat4__numRows = 8
Repeat4__index = 0
OutrosJogos_numRows = OutrosJogos_numRows + Repeat4__numRows
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
GrupoA_numRows = GrupoA_numRows + Repeat1__numRows
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script RUNAT=SERVER LANGUAGE=VBSCRIPT>	
function DoDateTime(str, nNamedFormat, nLCID)	
dim strRet	
dim nOldLCID	

strRet = str	
If (nLCID > -1) Then	
oldLCID = Session.LCID	
End If	

On Error Resume Next	

If (nLCID > -1) Then	
Session.LCID = nLCID	
End If	

If ((nLCID < 0) Or (Session.LCID = nLCID)) Then	
strRet = FormatDateTime(str, nNamedFormat)	
End If	

If (nLCID > -1) Then	
Session.LCID = oldLCID	
End If	

DoDateTime = strRet	
End Function	
</SCRIPT>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Corumbá On Line - Campeonato Estadual 2010</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.ultimoproximo {
color: #008000;
}
.OucaeVeja {
font-family: Verdana, Geneva, sans-serif;
font-size: 10px;
}
-->
</style>
<link href="CSS/fontes.css" rel="stylesheet" type="text/css" />
</head>

<body>
<table width="1033" border="0">
<tr>
<td width="1027"><img src="images/bannerPrincipal.jpg" width="1024" height="259" /></td>
</tr>
<tr>
<td><table width="1025" border="0">
<tr>
<td width="238" height="21" class="OucaeVeja"><img src="images/logo corumbaonline.png" width="200" height="48" /></td>
<td width="218" class="OucaeVeja"><div align="center"><strong><a href="../transmissao.html">Ouça Corumbaense x Águia Negra</a></strong></div></td>
<td width="87"> </td>
<td width="225" class="Resultado"><div align="center" class="OucaeVeja"><strong><a href="../transmissao_video.html">Veja Corumbaense x Águia Negra (06/03)</a></strong></div></td>
<td width="235" class="OucaeVeja"><div align="right"><img src="images/logo corumbaonline.png" alt="" width="200" height="48" /></div></td>
</tr>
</table></td>
</tr>
<tr>
<td><table border="0">
<tr>
<td align="left" valign="top"><img src="images/delineador.png" alt="" width="234" height="5" /></td>
<td align="left" valign="top"><strong class="tituloclassificacaobranco"><img src="images/delineador_meio.png" alt="" width="470" height="5" /></strong></td>
<td align="left" valign="top"><img src="images/delineador.png" alt="" width="234" height="5" /></td>
</tr>
<tr>
<td> </td>
<td class="ultimoproximo"><strong>Classificação</strong></td>
<td> </td>
</tr>
<tr>
<td rowspan="2" align="center" valign="top"><table width="200" border="0" bgcolor="#E6E6E6">
<tr>
<td colspan="5"><strong class="ultimoproximo">Último Jogo</strong></td>
</tr>
<tr>
<td colspan="5"><table width="93%" border="0" align="left">
<tr>
<td width="14%" nowrap="nowrap" class="corumbaensepantanal"><div align="center"><%=(corumbaultimo.Fields.Item("Time1No").Value)%></div></td>
<td width="35%"><div align="center"></div></td>
<td width="1%" class="corumbaensepantanal"><div align="center"><strong>x</strong></div></td>
<td width="35%"><div align="center"></div></td>
<td width="15%" nowrap="nowrap" class="corumbaensepantanal"><div align="center"><%=(corumbaultimo.Fields.Item("Time2No").Value)%></div></td>
</tr>
<tr>
<td><div align="center"><img src="../Estadual2010/escudos/<%=(corumbaultimo.Fields.Item("time1logo").Value)%>" alt="" /></div></td>
<td><div align="center" class="Resultado">
<div align="center"><%=(corumbaultimo.Fields.Item("Gol1ID").Value)%></div>
</div></td>
<td><div align="center" class="corumbaensepantanal"><strong>x</strong></div></td>
<td><div align="center" class="Resultado">
<div align="center"><%=(corumbaultimo.Fields.Item("Gol2ID").Value)%></div>
</div></td>
<td><div align="center"><img src="../Estadual2010/escudos/<%=(corumbaultimo.Fields.Item("time2logo").Value)%>" />
</div></td>
</tr>
<tr>
<td colspan="5"><div align="center" class="localhora"><%= DoDateTime((corumbaultimo.Fields.Item("Data").Value), 2, -1) %><br />
<%=(corumbaultimo.Fields.Item("EstadioID").Value)%> - <%= DoDateTime((corumbaultimo.Fields.Item("hora").Value), 4, 1033) %></div></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="5"><img src="images/delineador.png" alt="" width="234" height="5" /></td>
</tr>
<tr>
<td colspan="5"><div align="left"><strong class="ultimoproximo">Próximo Jogo</strong></div></td>
</tr>
<tr>
<td colspan="5" align="left" valign="top"><table width="100%" border="0" align="center">
<tr>
<td width="14%" nowrap="nowrap" class="corumbaensepantanal"><div align="center"><%=(corumbaproximo.Fields.Item("Time1No").Value)%></div></td>
<td width="35%"><div align="center"></div></td>
<td width="1%"><div align="center" class="corumbaensepantanal"><strong>x</strong></div></td>
<td width="35%"><div align="center"></div></td>
<td width="15%" nowrap="nowrap" class="corumbaensepantanal"><div align="center"><%=(corumbaproximo.Fields.Item("Time2No").Value)%></div></td>
</tr>
<tr>
<td><div align="center"><img src="../Estadual2010/escudos/<%=(corumbaproximo.Fields.Item("time1logo").Value)%>" alt="" /></div></td>
<td><div align="center" class="Resultado"><%=(corumbaproximo.Fields.Item("Gol1ID").Value)%></div></td>
<td><div align="center" class="corumbaensepantanal"><strong>x</strong></div></td>
<td><div align="center" class="Resultado"><%=(corumbaproximo.Fields.Item("Gol2ID").Value)%></div></td>
<td><div align="center"><img src="../Estadual2010/escudos/<%=(corumbaproximo.Fields.Item("time2logo").Value)%>" alt="" /></div></td>
</tr>
<tr>
<td height="55" colspan="5"><div align="center">
<p class="localhora"><%= DoDateTime((corumbaproximo.Fields.Item("Data").Value), 2, -1) %><br />
<%=(corumbaproximo.Fields.Item("EstadioID").Value)%> - <%= DoDateTime((corumbaproximo.Fields.Item("hora").Value), 4, 1033) %>
</div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="5"><img src="images/delineador.png" alt="" width="234" height="5" /></td>
</tr>
<tr>
<td colspan="5"><div align="left"><strong class="ultimoproximo">Outros Jogos</strong></div></td>
</tr>
<% 
While ((Repeat4__numRows <> 0) AND (NOT OutrosJogos.EOF)) 
%>
<tr>
<td colspan="5" class="OutrosJogostabela"><span class="OutrosjogostabelaN"><%= DoDateTime((OutrosJogos.Fields.Item("Data").Value), 2, -1) %></span> -<span class="OutrosjogostabelaN"> <%= DoDateTime((OutrosJogos.Fields.Item("hora").Value), 4, 1033) %></span></td>
</tr>
<tr>
<td class="OutrosJogostabela"><%=(OutrosJogos.Fields.Item("Time1No").Value)%></td>
<td class="OutrosJogostabela"><%=(OutrosJogos.Fields.Item("Gol1ID").Value)%></td>
<td class="OutrosJogostabela">X</td>
<td class="OutrosJogostabela"><%=(OutrosJogos.Fields.Item("Gol2ID").Value)%></td>
<td class="OutrosJogostabela"><%=(OutrosJogos.Fields.Item("Time2No").Value)%></td>
</tr>
<% 
Repeat4__index=Repeat4__index+1
Repeat4__numRows=Repeat4__numRows-1
OutrosJogos.MoveNext()
Wend
%>
</table></td>
<td align="center" valign="top"><table width="200" border="0">
<tr>
<td><strong class="tituloclassificacaobranco"><img src="images/delineador_meio.png" width="470" height="5" /></strong></td>
</tr>
<tr>
<td bgcolor="#3333CC" class="tituloclassificacaobranco"><strong>Grupo A</strong></td>
</tr>
<tr>
<td align="left" valign="top"><table border="0">
<tr class="classificacao">
<td><strong>Posição</strong></td>
<td><strong>Clube</strong></td>
<td><div align="center"><strong>PG</strong></div></td>
<td><div align="center"><strong>JG</strong></div></td>
<td><div align="center"><strong>VI</strong></div></td>
<td><div align="center"><strong>EM</strong></div></td>
<td><div align="center"><strong>DE</strong></div></td>
<td><div align="center"><strong>GP</strong></div></td>
<td><div align="center"><strong>GC</strong></div></td>
<td><div align="center"><strong>SG</strong></div></td>
<td><div align="center"><strong>%</strong></div></td>
</tr>
<% 
While ((Repeat1__numRows <> 0) AND (NOT GrupoA.EOF)) 
%>
<tr class="classificacao">
<td> </td>
<td><%=(GrupoA.Fields.Item("NomeAbrevia").Value)%></td>
<td><%=(GrupoA.Fields.Item("Pontos").Value)%></td>
<td><%=(GrupoA.Fields.Item("Jogos").Value)%></td>
<td><%=(GrupoA.Fields.Item("Vitorias").Value)%></td>
<td><%=(GrupoA.Fields.Item("Empates").Value)%></td>
<td><%=(GrupoA.Fields.Item("Derrotas").Value)%></td>
<td><%=(GrupoA.Fields.Item("Golspro").Value)%></td>
<td><%=(GrupoA.Fields.Item("Golscontra").Value)%></td>
<td><%=(GrupoA.Fields.Item("Saldodegols").Value)%></td>
<td><%=(GrupoA.Fields.Item("Aproveita").Value)%></td>
</tr>
<% 
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
GrupoA.MoveNext()
Wend
%>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td bgcolor="#3333CC"><span class="tituloclassificacaobranco"><strong>Grupo B</strong></span></td>
</tr>
<tr>
<td height="55" align="left" valign="top"><table border="0">
<tr class="classificacao">
<td><strong>Posição</strong></td>
<td><strong>Clube</strong></td>
<td><div align="center"><strong>PG</strong></div></td>
<td><div align="center"><strong>JG</strong></div></td>
<td><div align="center"><strong>VI</strong></div></td>
<td><div align="center"><strong>EM</strong></div></td>
<td><div align="center"><strong>DE</strong></div></td>
<td><div align="center"><strong>GP</strong></div></td>
<td><div align="center"><strong>GC</strong></div></td>
<td><div align="center"><strong>SG</strong></div></td>
<td><div align="center"><strong>%</strong></div></td>
</tr>
<% 
While ((Repeat2__numRows <> 0) AND (NOT GrupoB.EOF)) 
%>
<tr class="classificacao">
<td> </td>
<td><%=(GrupoB.Fields.Item("NomeAbrevia").Value)%></td>
<td><%=(GrupoB.Fields.Item("Pontos").Value)%></td>
<td><%=(GrupoB.Fields.Item("Jogos").Value)%></td>
<td><%=(GrupoB.Fields.Item("Vitorias").Value)%></td>
<td><%=(GrupoB.Fields.Item("Empates").Value)%></td>
<td><%=(GrupoB.Fields.Item("Derrotas").Value)%></td>
<td><%=(GrupoB.Fields.Item("Golspro").Value)%></td>
<td><%=(GrupoB.Fields.Item("Golscontra").Value)%></td>
<td><%=(GrupoB.Fields.Item("Saldodegols").Value)%></td>
<td><%=(GrupoB.Fields.Item("Aproveita").Value)%></td>
</tr>
<% 
Repeat2__index=Repeat2__index+1
Repeat2__numRows=Repeat2__numRows-1
GrupoB.MoveNext()
Wend
%>
</table></td>
</tr>
<tr>
<td height="55" align="left" valign="top"> </td>
</tr>
<tr>
<td height="55" align="left" valign="top"><table width="42%" border="0" align="left" cellspacing="0">
<% 
While ((Repeat3__numRows <> 0) AND (NOT Rodadas.EOF)) 
%>
<tr bgcolor="#FFFFCC" class="rodadascompletas">
<td width="12%" align="left" valign="top" nowrap="nowrap"><%=(Rodadas.Fields.Item("Rodada").Value)%>ª Rodada</td>
<td width="12%" align="left" valign="top" nowrap="nowrap"><%= DoDateTime((Rodadas.Fields.Item("Data").Value), 2, -1) %></td>
<td width="17%" align="right" valign="top" nowrap="nowrap"><%=(Rodadas.Fields.Item("Time1No").Value)%></td>
<td width="15%" align="left" valign="top" nowrap="nowrap"><%=(Rodadas.Fields.Item("Gol1ID").Value)%></td>
<td width="1%" align="left" valign="top" nowrap="nowrap">x</td>
<td width="15%" align="left" valign="top" nowrap="nowrap"><%=(Rodadas.Fields.Item("Gol2ID").Value)%></td>
<td width="17%" align="left" valign="top" nowrap="nowrap"><%=(Rodadas.Fields.Item("Time2No").Value)%></td>
<td width="17%" align="left" valign="top" nowrap="nowrap"><%=(Rodadas.Fields.Item("EstadioID").Value)%></td>
</tr>
<tr class="rodadascompletas">
<td align="left" valign="top" nowrap="nowrap"> </td>
<td align="left" valign="top" nowrap="nowrap"> </td>
<td align="left" valign="top" nowrap="nowrap"> </td>
<td align="left" valign="top" nowrap="nowrap"> </td>
<td align="left" valign="top" nowrap="nowrap"> </td>
<td align="left" valign="top" nowrap="nowrap"> </td>
<td align="left" valign="top" nowrap="nowrap"> </td>
<td align="left" valign="top" nowrap="nowrap"> </td>
</tr>
<% 
Repeat3__index=Repeat3__index+1
Repeat3__numRows=Repeat3__numRows-1
Rodadas.MoveNext()
Wend
%>
</table></td>
</tr>
</table>
</td>
<td rowspan="2" align="center" valign="top"><table width="200" border="0" bgcolor="#E6E6E6">
<tr>
<td><strong class="ultimoproximo">Último Jogo</strong></td>
</tr>
<tr>
<td><table width="200" border="0" align="center">
<tr>
<td class="corumbaensepantanal"><div align="center"><%=(pantanalultimo.Fields.Item("Time1No").Value)%></div></td>
<td><div align="center"></div></td>
<td class="corumbaensepantanal"><div align="center"><strong>x</strong></div></td>
<td><div align="center"></div></td>
<td class="corumbaensepantanal"><div align="center"><%=(pantanalultimo.Fields.Item("Time2No").Value)%></div></td>
</tr>
<tr>
<td><div align="center"><img src="escudos/<%=(pantanalultimo.Fields.Item("time1logo").Value)%>" alt="" /></div></td>
<td><div align="center" class="Resultado">
<div align="center"><%=(pantanalultimo.Fields.Item("Gol1ID").Value)%></div>
</div></td>
<td><div align="center" class="corumbaensepantanal"><strong>x</strong></div></td>
<td><div align="center" class="Resultado">
<div align="center"><%=(pantanalultimo.Fields.Item("Gol2ID").Value)%></div>
</div></td>
<td><div align="center"><img src="escudos/<%=(pantanalultimo.Fields.Item("time2logo").Value)%>" alt="" /></div></td>
</tr>
<tr>
<td height="24" colspan="5"><div align="center"><span class="localhora"><%= DoDateTime((pantanalultimo.Fields.Item("Data").Value), 2, -1) %><br />
<%=(pantanalultimo.Fields.Item("EstadioID").Value)%> - <%= DoDateTime((pantanalultimo.Fields.Item("hora").Value), 4, 1033) %></span></div></td>
</tr>
</table></td>
</tr>
<tr>
<td><img src="images/delineador.png" alt="" width="234" height="5" /></td>
</tr>
<tr>
<td><div align="left"><strong class="ultimoproximo">Próximo Jogo</strong></div></td>
</tr>
<tr>
<td><table width="200" border="0" align="center">
<tr>
<td class="corumbaensepantanal"><div align="center"><%=(pantanalproximo.Fields.Item("Time1No").Value)%></div></td>
<td><div align="center"></div></td>
<td><div align="center" class="corumbaensepantanal"><strong>x</strong></div></td>
<td><div align="center"></div></td>
<td class="corumbaensepantanal"><div align="center"><%=(pantanalproximo.Fields.Item("Time2No").Value)%></div></td>
</tr>
<tr>
<td><div align="center"><img src="escudos/<%=(pantanalproximo.Fields.Item("time1logo").Value)%>" alt="" /></div></td>
<td><div align="center" class="Resultado"><%=(pantanalproximo.Fields.Item("Gol1ID").Value)%></div></td>
<td><div align="center" class="corumbaensepantanal"><strong>x</strong></div></td>
<td><div align="center" class="Resultado"><%=(pantanalproximo.Fields.Item("Gol2ID").Value)%></div></td>
<td><div align="center"><img src="escudos/<%=(pantanalproximo.Fields.Item("time2logo").Value)%>" alt="" /></div></td>
</tr>
<tr>
<td colspan="5"><div align="center">
<p class="localhora"><%= DoDateTime((pantanalproximo.Fields.Item("Data").Value), 2, -1) %><br />
<%=(pantanalproximo.Fields.Item("EstadioID").Value)%> - <%= DoDateTime((pantanalproximo.Fields.Item("hora").Value), 4, 1033) %></p>
</div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div></td>
</tr>
</table></td>
</tr>
<tr>
<td><img src="images/delineador.png" alt="" width="234" height="5" /></td>
</tr>
<% 
While ((Repeat5__numRows <> 0) AND (NOT Estatistica.EOF)) 
%>
<tr>
<td class="OutrosJogostabela">Rodada <%=(Estatistica.Fields.Item("Rodada").Value)%></td>
</tr>
<tr>
<td class="OutrosJogostabela"><%=(Estatistica.Fields.Item("Gols").Value)%></td>
</tr>
<% 
Repeat5__index=Repeat5__index+1
Repeat5__numRows=Repeat5__numRows-1
Estatistica.MoveNext()
Wend
%>
<tr>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
<%
GrupoA.Close()
Set GrupoA = Nothing
%>
<%
GrupoB.Close()
Set GrupoB = Nothing
%>
<%
Rodadas.Close()
Set Rodadas = Nothing
%>
<%
OutrosJogos.Close()
Set OutrosJogos = Nothing
%>
<%
corumbaultimo.Close()
Set corumbaultimo = Nothing
%>
<%
corumbaproximo.Close()
Set corumbaproximo = Nothing
%>
<%
pantanalultimo.Close()
Set pantanalultimo = Nothing
%>
<%
pantanalproximo.Close()
Set pantanalproximo = Nothing
%>
<%
Estatistica.Close()
Set Estatistica = Nothing
%>

Compartilhar este post


Link para o post
Compartilhar em outros sites

ele gera algum erro ?

 

os campos precisam ser numéricos

Compartilhar este post


Link para o post
Compartilhar em outros sites

Não gera erro algum, apenas retorna os valores zerados, o campo é smallint. Como eu disse, na consulta SQL no PHPmyadmin, ele retorna a resposta correta, direitinho.

Compartilhar este post


Link para o post
Compartilhar em outros sites

verifique as permissões se estão setadas corretamente, e dê um response.write na sua strng SQL para ver o que esta sendo passado

response.wrte(SQL)
response.end()

Compartilhar este post


Link para o post
Compartilhar em outros sites

verifique as permissões se estão setadas corretamente, e dê um response.write na sua strng SQL para ver o que esta sendo passado

response.wrte(SQL)
response.end()
Resolvi usando essa SQL e quando subi pro servidor deu certo, funfo mesmo. Agora to pegando tempo pra tira a média de gols que seria entre Gols/jogos_rodada.

 

Aguardando dicas.

 

++++++++++++++++++++++++++++++++++++++++++++++

SELECT (Sum(Gol1ID) + Sum(Gol2ID)) AS Gols, Rodada, realizado, Count(*) AS jogos_rodada

FROM corumbaonline2.jogos

WHERE realizado = 'S' GROUP BY Rodada

++++++++++++++++++++++++++++++++++++++++++++++++

Compartilhar este post


Link para o post
Compartilhar em outros sites

 

verifique as permissões se estão setadas corretamente, e dê um response.write na sua strng SQL para ver o que esta sendo passado

response.wrte(SQL)
response.end()
Resolvi usando essa SQL e quando subi pro servidor deu certo, funfo mesmo. Agora to pegando tempo pra tira a média de gols que seria entre Gols/jogos_rodada.

 

Aguardando dicas.

 

++++++++++++++++++++++++++++++++++++++++++++++

SELECT (Sum(Gol1ID) + Sum(Gol2ID)) AS Gols, Rodada, realizado, Count(*) AS jogos_rodada

FROM corumbaonline2.jogos

WHERE realizado = 'S' GROUP BY Rodada

++++++++++++++++++++++++++++++++++++++++++++++++

 

 

Consegui tira a média, no servidor ele funfa, aqui no meu localhost não.

Compartilhar este post


Link para o post
Compartilhar em outros sites

verifique no localhost se esta com todos os direitos, permissões

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.