Im fairly new to programming and am all self taught but i have managed to get the basics. My biggest problem is the select data line.
Below i am trying to pull stats from a db showing only the stats requested from the team id. There is another database where the team id is pulled from ( season11 )
Any help? Here is what i have....
Below i am trying to pull stats from a db showing only the stats requested from the team id. There is another database where the team id is pulled from ( season11 )
Any help? Here is what i have....
Code:
<?php
// Connects to your Database
$teamid = $_GET["id"];
if (!is_numeric($teamid)){die();}
$sql = "SELECT Team, Num, Name, Pos, Salary, Contract, 11/12 Salary, 12/13 Salary, 13/14 Salary, Protected, Rookie FROM playerslist11 WHERE Team = " . $teamid . " ";
$data = mysql_query($sql)
or die(mysql_error());
Print "<table width = 775>";
Print "<th width=20 align = left bgcolor=#ebf0f6>TEAM</th>";
Print "<th bgcolor=#ebf0f6>#</th>";
Print "<th bgcolor=#ebf0f6>NAME</th>";
Print "<th bgcolor=#ebf0f6>POS</th>";
Print "<th bgcolor=#ebf0f6>SALARY</th>";
Print "<th bgcolor=#ebf0f6>CONTRACT</th>";
Print "<th bgcolor=#ebf0f6>STATUS</th>";
Print "<th bgcolor=#ebf0f6>11/12 SALARY </th>";
Print "<th bgcolor=#ebf0f6>12/13 SALARY</th>";
Print "<th bgcolor=#ebf0f6>13/14 SALARY</th>";
Print "<th bgcolor=#ebf0f6>PROTECTED</th>";
Print "<th bgcolor=#ebf0f6>ROOKIE</th>";
Print "<tr>";
Print "<td align = left width=80>".$info['Team'] . "</td> ";
Print "<td align = center>".$info['Num'] . "</td> ";
Print "<td align = center>".$info['Name'] . "</td> ";
Print "<td align = center>".$info['Pos'] . "</td> ";
Print "<td align = center>".$info['Salary'] . "</td> ";
Print "<td align = center>".$info['Contract'] . "</td> ";
Print "<td align = center>".$info['11/12_Salary'] . "</td> ";
Print "<td align = center>".$info['12/13_Salary'] . "</td> ";
Print "<td align = center>".$info['13/14_Salary'] . "</td> ";
Print "<td align = center>".$info['Protected'] . "</td> ";
Print "<td align = center>".$info['Rookie'] . "</td> ";
}
Print "</table>";
?>
<?php
include 'closedb.php';
?>
Comment