Nu wil ik de tabel gaan aanpassen door een waarde uit de array te vergelijken met die uit de tabel.
De array heeft deze structuur:
Array
(
[0] => Array
(
[nf] => AUS
[combinationID] => 108
[horseFEIid] => 102VN37
[personFEIid] => 10009036
[compNumber] => 0
[is_nc] => No
[is_waitingList] => No
[combinationLocked] => No
[dateAdded] => 2014-09-18 14:14:58
[dateEdit] => 2014-09-16 14:23:47
)
[1] => Array
(
[nf] => AUT
[combinationID] => 20
[horseFEIid] => 102VP001
[personFEIid] => 10009036
[compNumber] => 0
[is_nc] => No
[is_waitingList] => No
[combinationLocked] => No
[dateAdded] => 2014-09-18 14:14:58
[dateEdit] => 2014-09-16 14:23:47
)
Etc
}
Onderstaande code gebruik ik om dit te doen:
$compStart = 200;
$x = 0;
while ($x < $numberComb)
{
echo "UPDATE `2010Combination`
SET `compNumber` = '".$compStart."' ,`combinationLocked` = 'Yes'
WHERE `2010Combination`.`combinationID` = `".$arrAll[$x][combinationID]."`
";
$compStart++;
echo $x."<BR/>";
$x++;
}
De foutmelding die ik krijg is Notice: Use of undefined constant combinationID - assumed 'combinationID'
in deze regel: WHERE `2010Combination`.`combinationID` = `".$arrAll[$x][combinationID]."`
De vraag is of ik de array wel geod uitlees?