fix: update vales with quotes
This commit is contained in:
parent
fe5efbe8f1
commit
5fea5ad15f
@ -71,7 +71,7 @@ class BancaDati {
|
|||||||
public function update(string $table, string $id, array $values){
|
public function update(string $table, string $id, array $values){
|
||||||
$value = "";
|
$value = "";
|
||||||
foreach ($values as $col => $v){
|
foreach ($values as $col => $v){
|
||||||
$value .= $col . "=" . $v . ",";
|
$value .= $col . "=" . "'" . $v . "'" . ",";
|
||||||
}
|
}
|
||||||
$value = trim($value, ",");
|
$value = trim($value, ",");
|
||||||
|
|
||||||
@ -80,6 +80,7 @@ class BancaDati {
|
|||||||
$sth = $this->pdo->prepare($sql);
|
$sth = $this->pdo->prepare($sql);
|
||||||
$sth->execute();
|
$sth->execute();
|
||||||
}catch (PDOException $e){
|
}catch (PDOException $e){
|
||||||
|
var_dump($e);
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user