Insert and retrieve the old value (MySQL php)
I have a table with columns: [id, value] (id = integer PK, value= integer). I'd li开发者_如何学Goke to update the value column for a given id, retrieveing the old value. Is posible to do this in a single query? or I need to make a query and then an insert?
Thanks in advance
You could create a trigger that puts the old value in another table (or even into another column of the current table). Other than that, you'd need to do two queries.
精彩评论