Jump to content

Aravinthan

Members
  • Posts

    162
  • Joined

  • Last visited

    Never

Everything posted by Aravinthan

  1. No because he splits the query line and the actual query. Doing: $sql = "SOME SQL STATEMENT"; mysql_query($sql); Is the same as mysql_query("SOME SQL STATEMEMENT");
  2. Yeah but the teams played games. Here is the standings: http://cod-circuit.uweave.ca/standings.php
  3. Hi, I am running a fantasy league and I was wondering how is it possible to calculate the chances of a team to make it to the playoffs? There is 10 teams and the top 8 will make it to the playoffs. Thank you, Ara
  4. There is more than 50 pictures... And I am still adding pictures... That would be really tough to have them all in the same page...
  5. The pictures is too big. The pictures vary from 1600x1200 to 800x600 so placing them in the dropbox would not fit into the design...
  6. Hey guys, Ok so here is what I need to do. I have a ofrm where users select images. But the thing is, I want to show the images in a different page ( sort of a gallery ) and when the users cliks on the image they want and confirm the picture, I want the file name to be written in a textbox in a PHP form to be submitted into a DB. I can do the gallery part and the form and all... All I need is a way for me to send the picture's name and extension to the textbox of the form. Thanks for your help, Ara
  7. Hi guys, I have a little problem. So I want to order a table in a specific way. So I started building my code: $result = mysql_query("SELECT * FROM `teams` Order by ((`nhl_wins` *2) + `nhl_ot`) DESC",$link); while($row = mysql_fetch_array($result)) { if ($class == "class='odd'") { // this will rotate the value. $class = ""; }else{ $class = "class='odd'"; } // Moyenne Offensive $off = mysql_query("SELECT ROUND(AVG(`OFF`),2) AS `avgo` FROM teams JOIN players ON teams.id = players.team WHERE team='$row['team_name']'",$link); while($rowoff = mysql_fetch_array($off)) { $offe = "" .$rowoff['avgo']. ""; $offe = $offe / 10; } // Moyenne Defensive $def = mysql_query("SELECT ROUND(AVG(`DEF`),2) AS `avgd` FROM teams JOIN players ON teams.id = players.team WHERE team='$row['team_name']'",$link); while($rowoff = mysql_fetch_array($def)) { $defe = "" .$rowoff['avgf']. ""; $defe = $defe / 10; } // Moyenne Gardien $ga = mysql_query("SELECT ROUND(AVG(`OA`),2) AS `avgo` FROM teams JOIN players ON teams.id = players.team WHERE team='$row['team_name']' AND main_position ='1'",$link); while($rowoff = mysql_fetch_array($ga)) { $gar = "" .$rowoff['avgo']. ""; $gar = $gar / 10; } // Moyenne Generale $moyge = (round((($off + $def + $gar) / 3),2)) * 2; // Le reste $team = "" .$row['team_name']. ""; $gp = "" .$row['nhl_games_played']. ""; $wins = "" .$row['nhl_wins']. ""; $ot = "" .$row['nhl_ot']. ""; $loss = "" .$row['nhl_loss']. ""; $team = str_replace(" ", "", $team); $pts = (($wins * 2) + $ot) / 3.28; $winp = ((($ot * 0.5) + $wins) / $gp) * 100; $winp = round($winp, 2); $last10 = "" .$row['nhl_last10']. ""; $lwin = substr_count($last10, "W"); $lloss = substr_count($last10, "L"); $lot = substr_count($last10, "O"); $ltpo = (($wins * 2) + $ot) * 1.5; $total = $moyege + $pts + $ltpo; But its only after that I realised that it woudn't work. Because I want it to be ordered by the variable $total..... Can someone help me please? I want it to order by $total, but I dont know how... Thanks for your help, Ara
×
×
  • 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.