Nieuw lid |
|
Hey,
ik ben bezig met een log site (zoals sommigen vast al zullen weten xd)
maar vreemd genoeg inserthij het een wel en het ander niet, en ander echot hij ook niet oid.
foreach($result['stats']['deaths']['user'] as $key => $val) {
mysql_query("DELETE FROM Doden WHERE Naam='{$val['name']['value']}'") or die (mysql_error());
mysql_query("INSERT INTO Doden (`Naam`, `Tijd`, `Rank`, `Familie`) VALUES ('{$val['name']['value']}', '{$val['time']['value']}', '{$val['rank']['value']}', '{$val['family']['value']}')") or die (mysql_error());
}
$foo = $result['stats']['users'];
reset($foo['user']);
foreach($foo['user'] as $val){
print_r($val['name']['value']);
}
foreach($result['stats']['users']['user'] as $key => $val) {
echo $val['name']['value'];
mysql_query("DELETE FROM Spelers WHERE Naam='{$val['name']['value']}'") or die (mysql_error());
mysql_query("INSERT INTO Spelers (`Naam`, `Rank`, `Familie`, `Famrol`) VALUES ('{$val['name']['value']}', '{$val['rank']['value']}', '{$val['family']['name']['value']}', '{$val['family']['role']')") or die (mysql_error());
}
foreach($result['stats']['deaths']['user'] as $key => $val) { mysql_query("INSERT INTO Doden (`Naam`, `Tijd`, `Rank`, `Familie`) VALUES ('{$val['name']['value']}', '{$val['time']['value']}', '{$val['rank']['value']}', '{$val['family']['value']}')") or die (mysql_error()); } $foo = $result['stats']['users']; foreach($foo['user'] as $val){ } foreach($result['stats']['users']['user'] as $key => $val) { echo $val['name']['value']; mysql_query("INSERT INTO Spelers (`Naam`, `Rank`, `Familie`, `Famrol`) VALUES ('{$val['name']['value']}', '{$val['rank']['value']}', '{$val['family']['name']['value']}', '{$val['family']['role']')") or die (mysql_error()); }
iemand enig idee waarom hij niet update?
de arrays kan je vinden @ aepje.nl/logarrays.php
bvd
Pakito
|