$vlans=dbFetchRows("SELECT * FROM `ports_vlans` AS PV, vlans AS V WHERE PV.`port_id` = '".$port['port_id']."' and PV.`device_id` = '".$device['device_id']."' AND V.`vlan_vlan` = PV.vlan AND V.device_id = PV.device_id");
$otherports=dbFetchRows('SELECT * FROM `ports_vlans` AS V, `ports` as P WHERE V.`device_id` = ? AND V.`vlan` = ? AND P.port_id = V.port_id',array($device['device_id'],$vlan['vlan']));
foreach($otherportsas$otherport){
$vlan_ports[$otherport[ifIndex]]=$otherport;
}
$otherports=dbFetchRows('SELECT * FROM ports WHERE `device_id` = ? AND `ifVlan` = ?',array($device['device_id'],$vlan['vlan']));