diff --git a/BancaDati/BancaDati.php b/BancaDati/BancaDati.php index 12f9205..dd4823a 100644 --- a/BancaDati/BancaDati.php +++ b/BancaDati/BancaDati.php @@ -71,7 +71,7 @@ class BancaDati { public function update(string $table, string $id, array $values){ $value = ""; foreach ($values as $col => $v){ - $value .= $col . "=" . $v . ","; + $value .= $col . "=" . "'" . $v . "'" . ","; } $value = trim($value, ","); @@ -80,6 +80,7 @@ class BancaDati { $sth = $this->pdo->prepare($sql); $sth->execute(); }catch (PDOException $e){ + var_dump($e); die; } }