Hi guys,
I have a table which does not have any primary index fields. The table definition is:
I have a number of entries in the table and wish to update one of them.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
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:$sql="UPDATE $challengestable SET MatchStatus = 'Complete', Action_Date = CurrDate(), Division = 10 WHERE Player1 = $player1;"; $result = mysql_query($sql);
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




Reply With Quote