single( "SELECT id, port_a_type, port_a_id, port_b_type, port_b_id FROM connections WHERE id = ?", "i", [$connectionId] ); if (!$connection) { $_SESSION['error'] = 'Verbindung nicht gefunden'; header('Location: ?module=connections&action=list'); exit; } $sql->set( "UPDATE connections SET port_a_type = ?, port_a_id = ?, port_b_type = ?, port_b_id = ? WHERE id = ?", "sisii", [ (string)$connection['port_b_type'], (int)$connection['port_b_id'], (string)$connection['port_a_type'], (int)$connection['port_a_id'], $connectionId ] ); $_SESSION['success'] = 'Endpunkte wurden vertauscht'; header('Location: ?module=connections&action=list'); exit;