I have two tables mysql with the info:
TABLE A
| torneo | equipo | importe |
|---|---|---|
| 3 | 1 | 100.00 |
| 3 | 2 | 200.00 |
TABLE B
| equipo | torneo | importe | deuda | pago |
|---|---|---|---|---|
| 1 | 3 | 20.00 | 20.00 | 0 |
| 2 | 3 | 300.00 | 300.00 | 1 |
And I need know how to update the value from IMPORTE on TABLE B only if PAGO column on TABLE B are value 0 with the content of TABLE A column IMPORTE where equipo and torneo from both tables are the same.
Any idea?