prueba

 

{source}
<?php
$host = “localhost”;
$dbUser = “wwwwalk_pbsadmin”;
$dbPassword = “pbspassword54075”;
$dbName = “wwwwalk_pbstest”;
$db = mysql_connect($host, $dbUser,$dbPassword) or die ( ‘Unable to connect to server.’ );;
mysql_select_db($dbName,$db) or die ( ‘Unable to select database.’ );

$gm_bxscr_arr = mysql_query(“SELECT * FROM calendario WHERE gameID=22 “,$db);
$gmsScrRow = mysql_fetch_array($gm_bxscr_arr);

$visitorid = $gmsScrRow[visitorID];
$localid = $gmsScrRow[localID];

$gm_teams_arr = mysql_query(“SELECT team.club_medio FROM team WHERE team.teamID=$visitorid,$db);
$visitor = mysql_fetch_array($gm_teams_arr);
$visitante = $visitor[club_medio];

$gm_teams_arr = mysql_query(“SELECT team.club_medio FROM team WHERE team.teamID=$localid,$db);
$local_d = mysql_fetch_array($gm_teams_arr);
$local = $local_d[club_medio];

?>
<table width=“600”>
<tr>
<td> </td>

</tr>
<tr>
<td>
<! visitnate jugID=$Batter[$cont] >
<table width=“100% >
<tr>
<td width=“39%>Bateador</td>
<td width=“9%>Pos</td>
<td width=“8%>TB</td>
<td width=“9%>CA</td>
<td width=“9%>H</td>
<td width=“10%>CI</td>
<td width=“8%>BB</td>
<td width=“8%>SO</td>
</tr>

<?php
$gm_pbp_con = mysql_query(“SELECT DISTINCT jugID FROM gameplays WHERE gameID = 22 AND equID= $visitorid,$db);
$pbp_rows = mysql_fetch_array($gm_pbp_con);

do{
$Batter[$cont] = $pbp_rows[jugID];
/* $Equi[$cont] = $pbp_rows[equID]; */

$gm_bs_wn_arr = mysql_query(“SELECT * FROM players WHERE players.playerID=$Batter[$cont],$db);
$gmswnRow = mysql_fetch_array($gm_bs_wn_arr);

$bateador[$cont] = $gmswnRow[first].” “.$gmswnRow[last];

$vab_sql = mysql_query(“SELECT count(jugID) AS Vab FROM gameplays WHERE gameID = 22 AND equID= $visitorid,$db);
$vab_arr = mysql_fetch_array($vab_sql);
$vab = $vab_arr[Vab];

$ca_sql = mysql_query(“SELECT jugID,count(hom) AS Ca FROM gameplays WHERE gameID = 22 AND equID= $visitorid GROUP BY jugID= $Batter[$cont] HAVING hom>0″,$db);
$ca_arr = mysql_fetch_array($ca_sql);
$ca = $ca_arr[Ca];

$hit_sql = mysql_query(“SELECT jugID,count(plays) AS Hit FROM gameplays WHERE gameID = 22 AND equID= $visitorid GROUP BY jugID= $Batter[$cont] HAVING plays=1 OR plays=2 OR plays=3 OR plays=4″,$db);
$hit_arr = mysql_fetch_array($hit_sql);
$hit = $hit_arr[Hit];

echo <tr>
<td>
.$bateador[$cont].</td>
<td> </td>
<td>
.$vab.</td>
<td>
.$ca.</td>
<td>
.$hit.</td>
<td>
.$vab.</td>
<td>
.$vab.</td>
<td>
.$ca.</td>
</tr>
;

$cont++;
}while ($gmswnRow = mysql_fetch_array($gm_bs_wn_arr););

?>

</table>
<! ddddddddddddd >
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>
<! local >

<table width=“100% >
<tr>
<td>Bateador</td>
<td>Pos</td>
<td>TB</td>
<td>CA</td>
<td>H</td>
<td>CI</td>
<td>BB</td>
<td>SO</td>
</tr>
<tr>
<td width=“39%> </td>
<td width=“9%> </td>
<td width=“8%> </td>
<td width=“9%> </td>
<td width=“9%> </td>
<td width=“10%> </td>
<td width=“8%> </td>
<td width=“8%> </td>
</tr>
</table>
<! ddddddddddddd >
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
{/source}

Compartir

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *