1) ORDER BY FrontEndpointDeviceID ASC;"; $sth=$dbh->prepare($sql);$sth->execute(); if($sth->rowCount()>0){ $body.="

The list below are devices that have multiple connections to the same network card.

"; $body.='
DeviceID
KEY2
Count
'; foreach($sth as $row){ $body.="
{$row['FrontEndpointDeviceID']}
{$row['KEY1']}
{$row['Count']}
\n\n"; $sql2="SELECT * FROM fac_PatchConnection WHERE FrontEndpointDeviceID={$row['FrontEndpointDeviceID']} AND FrontEndpointPort=".str_replace($row['FrontEndpointDeviceID']."-", "", $row['KEY1']); $body.= '
FrontEndpointDeviceID
FrontEndpointPort
FrontNotes
RearEndpointDeviceID
RearEndpointPort
RearNotes
'; foreach ($dbh->query($sql2) as $i => $row){ $body.="
{$row['FrontEndpointDeviceID']}
{$row['FrontEndpointPort']}
{$row['FrontNotes']}
{$row['RearEndpointDeviceID']}
{$row['RearEndpointPort']}
{$row['RearNotes']}
\n"; } $body.="
\n"; } $body.='
'; $conflicts+=0; } ?> openDCIM Data Center Inventory