> For the complete documentation index, see [llms.txt](https://overfinch.gitbook.io/cheatsheet/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overfinch.gitbook.io/cheatsheet/pdo/update.md).

# UPDATE

Обновление в БД

```php
$db = new PDO("mysql:host=localhost;dbname=pdo;charset=utf8","root","");

$sql = "UPDATE users SET password=:password WHERE id=:id";
$stmt = $db->prepare($sql);

$password = "00000000";
$id = 3;

$stmt->bindValue("password",$password);
$stmt->bindValue("id",$id);
$stmt->execute();
```
