Compare commits

..

No commits in common. "6dffa09e88473cadf35b73116b7f93db1171666b" and "b8562a50e06a32a6f9a03ad1baaf783c0ef6a0a1" have entirely different histories.

View File

@ -30,32 +30,6 @@ class BancaDati {
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4)); return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
} }
/**
* Einheitliche Insert Funktion
* @param string $table
* @param array $values
* @return void
* author Simon Bock
*/
public function insert(string $table, array $values){
$value = "";
$column = "";
foreach ($values as $col => $v){
$value .= $v . ",";
$column .= $col . ",";
}
$value = trim($value, ",");
$column = trim($column, ",");
$sql = "INSERT INTO $table($column) VALUES ($value);";
try {
$sth = $this->pdo->prepare($sql);
$sth->execute();
}catch (\PDOException $e){
die;
}
}
/** /**
* Einheitliche Update Funktion * Einheitliche Update Funktion
* @param string $table * @param string $table