Results 1 to 2 of 2

Thread: [RESOLVED] Why won't this UPDATE query update?

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2006
    Posts
    159

    Resolved [RESOLVED] Why won't this UPDATE query update?

    Hi guys,
    I have a table which does not have any primary index fields. The table definition is:
    Code:
    Player1  	int(11)  	 	  		No  	0  	 	  
    Player2 	int(11) 				No 	0 		
    Action_Date 	date 					No 	0000-00-00 		
    MatchStatus 	varchar(15) 	latin1_swedish_ci 	Yes 	NULL 		
    Division 	int(11) 				No 	0
    I have a number of entries in the table and wish to update one of them.

    Code:
    $sql="UPDATE $challengestable SET MatchStatus = 'Complete', Action_Date = CurrDate(), Division = 10 WHERE Player1 = $player1;";
    $result = mysql_query($sql);
    In the current table the value of $player1 is only found once, but this will not be the case in the future. The problem I am having is that the above query doesn't do anything. I don't get an MySQL error, nor does the update happen. I have echoed the $SQL string and it is:
    Code:
    UPDATE 20061v1b_challenges SET MatchStatus = 'Complete', Action_Date = CurrDate(), Division = 10 WHERE Player2 = 15;

    I've spend 2 hours on this, and still don't have a clue. What could be wrong?

    Cheers,
    Nap
    Last edited by penagate; Mar 24th, 2007 at 12:19 PM. Reason: mark as resolved.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width