All pastes #46000 Raw Edit

Stuff

public sql v1 · immutable
#46000 ·published 2006-03-17 05:22 UTC
rendered paste body
mysql> select * from networking_ports where device_on='2339';+------+-----------+-------------+------------------------+--------+-------------------+----------------+--------+| ID   | device_on | device_type | iface                  | ifaddr | ifmac             | logical_number | name   |+------+-----------+-------------+------------------------+--------+-------------------+----------------+--------+| 1521 |      2339 |           1 | 100Mbps Ethernet (UTP) | N/A    | 00:03:BA:0D:EB:A5 |              0 | Port 0 || 1522 |      2339 |           1 | 100Mbps Ethernet (UTP) | N/A    | 00:03:BA:0D:EB:A5 |              0 | Port 0 || 1523 |      2339 |           1 | 100Mbps Ethernet (UTP) | N/A    | 00:03:BA:0D:EB:A5 |              0 | Port 0 || 1524 |      2339 |           1 | 100Mbps Ethernet (UTP) | N/A    | 00:03:BA:0D:EB:A5 |              0 | Port 0 || 1525 |      2339 |           1 | 100Mbps Ethernet (UTP) | N/A    | 00:03:BA:0D:EB:A5 |              0 | Port 0 || 1526 |      2339 |           1 | 100Mbps Ethernet (UTP) | N/A    | 00:03:BA:0D:EB:A5 |              0 | Port 0 || 1527 |      2339 |           1 | 100Mbps Ethernet (UTP) | N/A    | 00:03:BA:0D:EB:A5 |              0 | Port 0 |+------+-----------+-------------+------------------------+--------+-------------------+----------------+--------+So 'Device_on' matches an ID in a table called computers.  I want to change all ifmac in networking_ports that match the first device_on to the computers.id