In MySql, without using stored procedures or additional queries, how can I get a value from the affected row when using update?
Eg:
Table
id | item | status
-------------------------------
1 | item-1 | 0
2 | item-2 | 0
3 | item-3 | 0
4 | item-4 | 0
5 | item-5 | 0
6 | item-6 | 0
update items set status = 1 where id = 2;
//get value of `item` of affected row, in this case `item-2` since we updated `id = 2`
Is something like this available in MySql? Or at least another way to do it?