Phinx: Feature Request: Update several columns in the database.

Created on 23 Feb 2016  路  3Comments  路  Source: cakephp/phinx

I would love to be able to update a column values in my DB, e.g:
update table set col_1 = val where col_2 = val2

feature

Most helpful comment

You can use $this->query('update table set col_1 = val where col_2 = val2');, but you would have to manually code up() and down() separately.

All 3 comments

What is the use case here, how would you use it. Can you provide some example?

You can use $this->query('update table set col_1 = val where col_2 = val2');, but you would have to manually code up() and down() separately.

Working solution seems enough then. Closing.

Was this page helpful?
0 / 5 - 0 ratings