Commit 14b7aea0 authored by Nico Schallehn's avatar Nico Schallehn

test

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