query string;
select gen.status, inv.status from generalledger as gen left join invoices as inv on gen.transid = inv.invoiceid where inv.status = 'Paid' and inv.account = 'dispensesource'
Result
+--------+--------+
| status | status |
+--------+--------+
| Paid | Paid |
| Open | Paid |
+--------+--------+
update query:
update generalledger as gen left join invoices as inv on gen.transid = inv.invoiceid set gen.status = 'Paid' where inv.status = 'Paid' and inv.account = 'dispensesource'
Result:
Query OK, 0 rows affected (0.02) sec
Rows matched: 1 Changed: 0 Warnings: 0