Everything works until I try and use a variable in an update statement. So ....
Variable is stored in a session
Code: Select all
// in the head of the page get the tournament ID
$TID = "-1";
if (isset($_GET['tournID'])) {
$TID = $_GET['tournID'];
}
The problem is here
Code: Select all
// Add the tourn id to the appropriate players
$querytoexecute = "UPDATE `mydatabase`.`tourn_entry_set_rank_temp`
SET `tourn_id` = (SELECT tourn_entry.tournament_number
FROM tourn_entry
WHERE tourn_entry.tourn_memb_id=tourn_entry_set_rank_temp.memb_id AND tourn_entry.tournament_number=62)";
$result=mysql_query($querytoexecute, $con) or die("<br><br><font face='arial' color='green'>Error tourn_id not set</font>");
if (isset($result)) echo "<br><br><font face='arial' color='green'>Successfully set the tourn_id for players as per the passed variable </font>";AND tourn_entry.tournament_number=62)
so it would look something like this
AND tourn_entry.tournament_number='$TID')
Any assistance will be greatly appreciated