syoung Posted July 27, 2011 Share Posted July 27, 2011 Hi all, i am looking to pull data from a specific location. The location is the "subconference" in the teams table with a specific id. Here is my code or what im working with.... <?php // Connects to your Database $teamid = $_REQUEST["id"]; $sql = 'select *from season11 join teams WHERE season11 . team =teams . teamnameseason AND teams . subconference ="Northwest" ORDER BY `season11` . `P` DESC'; $data = mysql_query($sql) or die(mysql_error()); Print "<table width = 240>"; Print "<th width=80 align = left bgcolor=#ebf0f6>Northwest</th>"; Print "<th bgcolor=#ebf0f6>GP</th>"; Print "<th bgcolor=#ebf0f6>W</th>"; Print "<th bgcolor=#ebf0f6>L</th>"; Print "<th bgcolor=#ebf0f6>Pts</th>"; Print "<th bgcolor=#ebf0f6>GF</th>"; Print "<th bgcolor=#ebf0f6>GA</th>"; Print "<th bgcolor=#ebf0f6>L10</th>"; while($info = mysql_fetch_array( $data )) { $wins = $info['W']; $OTW = $info['OW']; $totalwins = $wins + $OTW ; $teamnameseason = $info['teamnameseason']; Print "<tr>"; Print "<td align = left width=80>".$info['team'] . "</td> "; Print "<td align = center>".$info['GP'] . "</td> "; Print "<td align = center>"; Print $totalwins; Print "</td> "; Print "<td align = center>".$info['L'] . "</td> "; Print "<td align = center>".$info['P'] . "</td> "; Print "<td align = center>".$info['GF'] . "</td> "; Print "<td align = center>".$info['GA'] . "</td> "; Print "<td align = center>".$info['L10'] . "</td> "; } Print "</table>"; ?> <?php include 'closedb.php'; ?> Where it says subconference ="Northwest" i need it to change per id... Still abit new so dont be at my questions... Thanks a bunch.... Quote Link to comment Share on other sites More sharing options...
syoung Posted July 28, 2011 Author Share Posted July 28, 2011 bump. Quote Link to comment Share on other sites More sharing options...
syoung Posted July 30, 2011 Author Share Posted July 30, 2011 Thanks guys.. Another forum has solved my issue.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.