> For the complete documentation index, see [llms.txt](https://jls-organization-3.gitbook.io/projecthyper/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jls-organization-3.gitbook.io/projecthyper/features/quickstart/update.md).

# update

Update a new record.

**Usage:**

```php
$db->{table}->update($where, $data);
```

<pre class="language-php"><code class="lang-php"><strong>$news = $db->news->update(
</strong>    array('id' => 1),
    array('name' => 'Updated name')
);
// or
$news = $db->news->update(
    1, // WHERE 1 is your primary ID
    array('name' => 'Updated name')
);
</code></pre>

**Return:**

```json
{
    "id": "AUTO_GENERATED_ID",
    "name": "Updated name",
    "status": "ACTIVE",
    "created_at": "2024-11-03 21:07:37",
    "updated_at": "2024-11-03 21:07:37",
    "deleted_at": null
}
```

Looking for the other parameters?

{% content-ref url="/pages/GBigEuwxBTtPN353H08f" %}
[Parameters](/projecthyper/features/quickstart/parameters.md)
{% endcontent-ref %}
