Napoleon
Mar 7th, 2007, 07:27 PM
Hi guys,
I have a table which does not have any primary index fields. The table definition is:
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.
$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:
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
I have a table which does not have any primary index fields. The table definition is:
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.
$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:
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