Commit 31afc3a3 authored by Nico Schallehn's avatar Nico Schallehn

test

parent 14b7aea0
......@@ -216,15 +216,21 @@ class Media {
$update ="";
$first = true;
foreach ($newData AS $key=> $value){
if(($key == "rating") AND !($Film['rating'] == $newData["rating"])){
if(!($Film[$key] == $newData[$key]) ) {
$update .= " ".($first?"":",").$key." = '".$value."'";
$first = false;
}
}
if(!$first){
$SQL = "UPDATE Filme SET".$update." WHERE imdbID = '".$Film["imdbID"]."';";
file_put_contents("./phpTestout/update.txt", $SQL.PHP_EOL, FILE_APPEND);
echo $SQL.PHP_EOL;
}else {
echo "Nix zu ändern!".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