How to update from select with a Join
UPDATE invoiceLine
INNER JOIN terminal
ON invoiceLine.ctn = terminal.ctn
INNER JOIN network
ON terminal.network = network.id
SET invoiceLine.network = network.label
UPDATE invoiceLine SET network = (
SELECT label FROM network WHERE id = (
SELECT network FROM terminal WHERE terminal.ctn = invoiceLine.ctn
)
)