(PHP) need help with new NHL Standings..

If you need help building your website, this is the place to hang out. If you're an HTML, PHP, Perl or web database geek, check it out. / Si vous avez besoin d'aide pour construire votre site web, c'est le forum à regarder! Si vous êtes un expert en HTML, PHP, Perl ou en base de données, c'est le forum pour vous!
Post Reply
Str_QNHL
The Addict / Le Drogué
Posts: 752
Joined: Fri Oct 28, 2005 2:42 pm
Location: Ste-Julie
Contact:

(PHP) need help with new NHL Standings..

Post by Str_QNHL »

Im having trouble getting the new standings to show up
here is what I have

//Query Pacific //
$QueryPacific="SELECT * FROM QNHLProTeamV2 WHERE Division='$PacificDivision' ORDER by Points DESC, GP ASC, W DESC, GoalDiff DESC LIMIT 3";
$ResultPacific=mysql_query($QueryPacific);
$NumPacific=mysql_num_rows($ResultPacific);

//Query West Wild Card //
$QueryWestWildCard="SELECT * FROM QNHLProTeamV2 WHERE Conference='$WesternConference' ORDER by Points DESC, GP ASC, W DESC, GoalDiff DESC LIMIT 6,20";
$ResultWestWildCard=mysql_query($QueryWestWildCard);
$NumWestWildCard=mysql_num_rows($ResultWestWildCard);

//Query Est Wild Card //
$QueryEstWildCard="SELECT * FROM QNHLProTeamV2 WHERE Conference='$EasternConference' ORDER by Points DESC, GP ASC, W DESC, GoalDiff DESC LIMIT 6,20";
$ResultEstWildCard=mysql_query($QueryEstWildCard);
$NumEstWildCard=mysql_num_rows($ResultEstWildCard);

I can show top 3 of each division. my trouble is with the Wild card.

I was only able to show the Conference standings while skipping top 6 teams.
my problem is if a lower team from 1 division has more points then a top 3 team from the other division, the standings are incorrect
(www.qnhl.net) Canucks are there twice but Wild should be in the Wild card spot.

any ideas how I can fix this ?
( getting all my info fron STHS CSV files)

thanks
_______________
Stephane Roy
STHS Beta Tester
STHS Support Team
http://qnhl.net
Foo
The SuperStar
Posts: 1566
Joined: Thu Dec 29, 2005 12:56 pm

Re: (PHP) need help with new NHL Standings..

Post by Foo »

Le seul moyen que je vois rapidement, c'est de sortir tes 6 équipes de divisions classés dans 6 variables et dans ta requête WILD CARD tu spécifie que `Team` ne doit pas être égale à ces 6 variables. La requête est plus longue mais ça devrait fonctionner
Image
Image
Image
Foo
The SuperStar
Posts: 1566
Joined: Thu Dec 29, 2005 12:56 pm

Re: (PHP) need help with new NHL Standings..

Post by Foo »

dans le genre

$QueryWestWildCard="SELECT * FROM QNHLProTeamV2 WHERE Conference='$WesternConference' AND Team != '$team1' OR Conference='$WesternConference' AND Team != '$team2' etc. jusqu'à 6 ORDER by Points DESC, GP ASC, W DESC, GoalDiff DESC
Image
Image
Image
Str_QNHL
The Addict / Le Drogué
Posts: 752
Joined: Fri Oct 28, 2005 2:42 pm
Location: Ste-Julie
Contact:

Re: (PHP) need help with new NHL Standings..

Post by Str_QNHL »

as-tu un example de ......Le seul moyen que je vois rapidement, c'est de sortir tes 6 équipes de divisions classés dans 6 variables

et merci Foo :)
_______________
Stephane Roy
STHS Beta Tester
STHS Support Team
http://qnhl.net
Foo
The SuperStar
Posts: 1566
Joined: Thu Dec 29, 2005 12:56 pm

Re: (PHP) need help with new NHL Standings..

Post by Foo »

//Query Pacific //
$QueryPacific="SELECT * FROM QNHLProTeamV2 WHERE Division='$PacificDivision' ORDER by Points DESC, GP ASC, W DESC, GoalDiff DESC LIMIT 3";
$ResultPacific=mysql_query($QueryPacific);
$NumPacific=mysql_num_rows($ResultPacific);

ici exemple tu sors tes 3 équipes dans team1 team2 team3
Image
Image
Image
Str_QNHL
The Addict / Le Drogué
Posts: 752
Joined: Fri Oct 28, 2005 2:42 pm
Location: Ste-Julie
Contact:

Re: (PHP) need help with new NHL Standings..

Post by Str_QNHL »

ok c'est ce que j'ai ..j'etais juste pas sure comment faire le lien entre le Wild card et Team1 team2 et team3
_______________
Stephane Roy
STHS Beta Tester
STHS Support Team
http://qnhl.net
Post Reply