Commit 594f1649 authored by Nico Schallehn's avatar Nico Schallehn

test

parent a300deee
......@@ -246,19 +246,19 @@ class Media {
$update ="";
$first = true;
$changed = "";
foreach ($newData AS $key=> $value){
if(!(md5($Film[$key]) == md5($newData[$key]))) {
$update .= " ".($first?"":",").$key." = '".$value."'";
$first = false;
$changed .= $key.", ";
}
}
if(!$first){
$SQL = "UPDATE Filme SET".$update." WHERE imdbID = '".$Film["imdbID"]."';";
$counterChange++;
echo $SQL;
//$mysqli->query($SQL);
echo "Ändere ".$changed.PHP_EOL;
$mysqli->query($SQL);
file_put_contents("./phpTestout/update.txt", $SQL.PHP_EOL, FILE_APPEND);
echo $SQL.PHP_EOL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment