generic update
This commit is contained in:
parent
bc11dc127c
commit
306f489bd9
@ -29,4 +29,13 @@ class BancaDati {
|
||||
$data[8] = chr(ord($data[8]) & 0x3f | 0x80);
|
||||
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
|
||||
}
|
||||
public function update(string $table, string $id, string $value){
|
||||
$sql = "UPDATE " . $table . " SET " . $value . " WHERE `id` = " . $id . ";";
|
||||
try {
|
||||
$sth = $this->pdo->prepare($sql);
|
||||
$sth->execute();
|
||||
}catch (\PDOException $e){
|
||||
die;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user