# $this-\>tableGateway-\>update

**URL:** <https://discourse.laminas.dev/t/this-tablegateway-update/3877>\
**Category:** Components & MVC\
**Tags:** laminas-db\
**Created:** [March 25, 2025, 10:41am UTC](https://discourse.laminas.dev/t/this-tablegateway-update/3877 "2025-03-25T10:41:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jilco](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@Jilco](https://discourse.laminas.dev/u/Jilco)\
**Post date:** [March 25, 2025, 10:41am UTC](https://discourse.laminas.dev/t/this-tablegateway-update/3877/1 "2025-03-25T10:41:00Z")

</div>

I’m struggling with how to update a single column in a row set with tablegateway.  
I can update the whole row with passing the object, but how to update a single value in the row?  
I want to set “status” to 2 where “ID” = 150.  
Below is not working:

```auto
        $this->tableGateway->update("status=3", [
            'ID' => '151'
        ]);

```

---

<div class="post-metadata">

**Author:** ![froschdesign](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/froschdesign/32/38_2.png) [@froschdesign](https://discourse.laminas.dev/u/froschdesign)\
**Post date:** [March 25, 2025, 10:51am UTC](https://discourse.laminas.dev/t/this-tablegateway-update/3877/2 "2025-03-25T10:51:35Z")

</div>

> [@Jilco](#):
>
> Below is not working:

Check the allowed parameter:

> **[SQL Abstraction - laminas-db - Laminas Docs](https://docs.laminas.dev/laminas-db/sql/#update)**
>
> Database abstraction layer, SQL abstraction, result set abstraction, and RowDataGateway and TableDataGateway implementations

---

<div class="post-metadata">

**Author:** ![Jilco](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@Jilco](https://discourse.laminas.dev/u/Jilco)\
**Post date:** [March 25, 2025, 12:51pm UTC](https://discourse.laminas.dev/t/this-tablegateway-update/3877/3 "2025-03-25T12:51:28Z")

</div>

Thanks!

$this-\>tableGateway-\>update([‘status’ =\> 8], [‘ID’ =\> 151]);
