Jump to content

leerik

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

leerik's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Sweet! you got it! it was that fourth-to-last line, i suppose. Thanks!! Yeah, I use the AS in SQL for later appropriation in arrays.
  2. All right, here's a bunch of code for ya... The line in question is right after "if(mysql_num_rows($player0_team_modifyoradd) == 0)" I'll try putting the SQL statement on one line, but as you can see, i've done a lot of them on seperate lines that seem to work fine... } else { //if the player _does_ have stats for this m/r/c, then update them if($player0points != "") { mysql_query("UPDATE LA4square_points SET PointsAmount = '$player0points' WHERE PointsPlayerNumber = '$player0num' AND PointsMatchCourt = '$courts_select' AND PointsMatchRound = '$rounds_select' AND PointsMatchID = '$matchid' AND PointsSeasonID = '$season_id'", $connection) or die(mysql_error()); } if($player0entries != "") { mysql_query("UPDATE LA4square_entries SET EntriesAmount = '$player0entries' WHERE EntriesPlayerNumber = '$player0num' AND EntriesMatchCourt = '$courts_select' AND EntriesMatchRound = '$rounds_select' AND EntriesMatchID = '$matchid' AND EntriesSeasonID = '$season_id'", $connection) or die(mysql_error()); } if($player0aces != "") { mysql_query("UPDATE LA4square_aces SET AcesAmount = '$player0aces' WHERE AcesPlayerNumber = '$player0num' AND AcesMatchCourt = '$courts_select' AND AcesMatchRound = '$rounds_select' AND AcesMatchID = '$matchid' AND AcesSeasonID = '$season_id'", $connection) or die(mysql_error()); } if($player0bodysacs != "") { mysql_query("UPDATE LA4square_bodysacs SET BodySacsAmount = '$player0bodysacs' WHERE BodySacsPlayerNumber = '$player0num' AND BodySacsMatchCourt = '$courts_select' AND BodySacsMatchRound = '$rounds_select' AND BodySacsMatchID = '$matchid' AND BodySacsSeasonID = '$season_id'", $connection) or die(mysql_error()); } if($player0style != "") { mysql_query("UPDATE LA4square_stylepoints SET StylePointsAmount = '$player0style' WHERE StylePointsPlayerNumber = '$player0num' AND StylePointsMatchCourt = '$courts_select' AND StylePointsMatchRound = '$rounds_select' AND StylePointsMatchID = '$matchid' AND StylePointsSeasonID = '$season_id'", $connection) or die(mysql_error()); } } if($teams == "1") {   $player0team = $_POST['player0team'];     //determining if player 0 already has stats listed for this match/round/court   $player0_team_modifyoradd = mysql_query("SELECT LA4square_team_stats.TStatsPlayerNum AS teamplayerid   FROM LA4square_team_stats   WHERE LA4square_team_stats.TStatsPlayerNum = '$player0num' AND   LA4square_team_stats.TStatsTeamID = '$player0team' AND   LA4square_team_stats.TStatsSeasonID = '$season_id' AND   LA4square_team_stats.TStatsMatchID = '$matchid' AND   LA4square_team_stats.TStatsMatchRound = '$rounds_select' AND   LA4square_team_stats.TStatsMatchCourt = '$courts_select'", $connection)   or die(mysql_error());   if(mysql_num_rows($player0_team_modifyoradd) == 0)         {     //if the player has no stats for this particular match/round/court/team, create them!     mysql_query("INSERT INTO LA4square_team_stats SET     TStatsPlayerNum = '$player0num',     TStatsTeamID = '$player0team',     TStatsMatchCourt = '$courts_select',     TStatsMatchRound = '$rounds_select',     TStatsMatchID = '$matchid',     TStatsSeasonID = '$season_id',     TStatsPoints = '$player0points',                      TStatsEntries = '$player0entries',           TStatsAces = '$player0aces',           TStatsBodySacs = '$player0bodysacs',           TStatsStylePoints = '$player0style',             "$connection)     or die(mysql_error());         }       else
  3. that's what i thought!  :)  and yet, i still get the error. should i post more of the code preceding this?
  4. sorry!  ;D should i remove that second bracket to actually nest the second if statement?
  5. the first if statement ends much later. can you not nest if statements like that?
  6. I know I should be looking for a missing semicolon here or something, but I just can't seem to find where my syntax is wrong. My error message is this... Parse error: syntax error, unexpected T_VARIABLE in /home/www/s3/spy1u674/html/LA4squarestats/admin/roundscourts_teams.php on line 213 And here's my code (the last line with the bracket is line 213) if($teams == "1") {   $player0team = $_POST['player0team'];     //determining if player 0 already has stats listed for this match/round/court   $player0_team_modifyoradd = mysql_query("SELECT LA4square_team_stats.TStatsPlayerNum AS teamplayerid   FROM LA4square_team_stats   WHERE LA4square_team_stats.TStatsPlayerNum = '$player0num' AND   LA4square_team_stats.TStatsTeamID = '$player0team' AND   LA4square_team_stats.TStatsSeasonID = '$season_id' AND   LA4square_team_stats.TStatsMatchID = '$matchid' AND   LA4square_team_stats.TStatsMatchRound = '$rounds_select' AND   LA4square_team_stats.TStatsMatchCourt = '$courts_select'", $connection)   or die(mysql_error());   if(mysql_num_rows($player0_team_modifyoradd) == 0)         { Any help? Thanks!
×
×
  • 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.