Jump to content

pulling data from a specific location


syoung

Recommended Posts

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  :o at my questions... Thanks a bunch....

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.