Commit 424a2344 authored by Nico Schallehn's avatar Nico Schallehn

test

parent 37c7c97f
...@@ -240,8 +240,9 @@ class Media { ...@@ -240,8 +240,9 @@ class Media {
if($mysqli->error != ""){ echo "Mysql-Fehler: ".$mysqli->error.PHP_EOL; return false;} if($mysqli->error != ""){ echo "Mysql-Fehler: ".$mysqli->error.PHP_EOL; return false;}
//$ret->num_rows //$ret->num_rows
$Querys= array(); $Querys= array();
$keys = array(); $keys = array("views", "check", "comment");
$values = array(); $values = array(0, "null", "");
foreach ($DataArr as $key => $value) { foreach ($DataArr as $key => $value) {
if(in_array($key, array("Genre", "Schauspieler")) ){//TODO hier weiter!! if(in_array($key, array("Genre", "Schauspieler")) ){//TODO hier weiter!!
//echo " ".$key." => '".implode("|", )."'".PHP_EOL; //echo " ".$key." => '".implode("|", )."'".PHP_EOL;
...@@ -268,13 +269,13 @@ class Media { ...@@ -268,13 +269,13 @@ class Media {
}else{ }else{
$keys[] = $key; $keys[] = $key;
$values[] = "'".$value."'"; $values[] = "'".$value."'";
echo " ".$key." => '".$value."'".PHP_EOL; //echo " ".$key." => '".$value."'".PHP_EOL;
} }
} }
$Query = "INSERT INTO Filme (".implode(",", $keys).") VALUES (".implode(",", $values).")"; $Query = "INSERT INTO Filme (".implode(",", $keys).") VALUES (".implode(",", $values).")";
echo PHP_EOL.$this->Console->getColoredString("Query", "light_gray", "green")." ".$Query.PHP_EOL; echo $this->Console->getColoredString("Query", "light_gray", "green")." ".$Query.PHP_EOL;
sleep(3000); sleep(3000);
foreach ($Querys as $Query) { foreach ($Querys as $Query) {
echo $this->Console->getColoredString("Query", "light_gray", "green")." ".$Query.PHP_EOL; echo $this->Console->getColoredString("Query", "light_gray", "green")." ".$Query.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