Jump to content

pebcak

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Everything posted by pebcak

  1. roopurt18: That works! Thanks! Barand: Your code results in a "#1109 - Unknown table 'x' in field list". It's probably me though.
  2. Oh crud. I should've been more explicit in my description -- sorry!!
  3. Certainly! Here you go! [attachment deleted by admin]
  4. That looks like it just might work! The output I'm getting seems quirky though: team Wins Losses Orcas Island 0 0 Marysville-Pilchuck 0 3 Shorewood 0 0 Squalicum 0 0 Steilacoom 0 0 Blaine 0 0 Lynden Christian 0 0 Mariner 0 0 Darrington 0 0 Wenatchee 0 0 Anacortes 0 6 Lakewood 0 0 Stanwood 0 0 Liberty Bell 0 1 Everett 0 0 Bishop Blanchet 0 1 Meridian 0 0 La Conner 0 4 It's odd because all teams have only played one game thus far but are showing they've won/loss more than that.
  5. at Oldiesmann & Illusion: I got Oldiesmann code to run. I didn't see the other "mysql_error". The output is kind of whacky though. I'm using this: echo $name . " - " . $wins . " - " . $games_lost . "<br>"; and the output is: Mount Vernon - 0 - 70 Sehome - 0 - 70 Ferndale - 0 - 70 Bellingham - 0 - 70 Nooksack Valley - 0 - 72 Mount Baker - 0 - 72 Ridgefield - 0 - 72 Sedro-Woolley - 0 - 72 All teams have only played one game thus far and the ones showing "0 - 70" are the ones that have won their game. For that last column it looks like it's showing total number of games minus games played + 1 or something. Any thoughts? ------------------------ at roopurt18: I tried that and got the following error: "#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'table b ON ( a.home_team = b.away_team ) GROUP BY a. `home_team` ORDER BY ' at line 1"
  6. I found the problem - closing quote at the end of the mysql_query. However, now it just says: Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /path/to/file/file.php on line 24 Line 24 is: $wins = mysql_result($query2, 0, 0) + mysql_result($query2, 0, 1);
  7. Any idea on why that error would be happening?
  8. Oldiesmann, thanks for the help! I get this error... "unexpected $end"
  9. My client is using a single table to track football scores. It's really odd that he's not using multiple tables but I've been told I am not allow to modify the structure. He wants me to list the teams along with the number of wins/losses, ordered by wins. His table: game_id |home_team |away_team |home_results |away_results ---------------------------------------------------------------------- 1 |Central |Kickapoo |Win |Loss 2 |Glendale |Hillcrest |Loss |Win 3 |Joplin |Aurora |Loss |Win Any help would be great!
×
×
  • 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.