I have a table in my DB, called contas
. Where do I register all system accounts.
As soon as they are paid I make a update
by changing their status. However, I send a single update for multiple accounts, as follows:
update contas
set status='0',
valor_recebido='aqui preciso capturar o campo valor'
where id IN ($ids)
So far so good, but in the valor_recebido
field I need to capture the value of the valor
field of the same conta
table.
Does anyone know if this is possible?
Do I make a update
and at the same time assign the value of one field of the table, to another field?