by nie wyciagać z bazy już wyciągnięte dane zrobiłem to w php w ten sposób:
#v+
if($customernodes)
foreach($customernodes as $idx => $row)
{
$customernodes[$idx]['net'] = $DB->GetRow('SELECT *, inet_ntoa(address) AS ip FROM networks WHERE address = (inet_aton(mask) & ?)', array($row['ipaddr']));
$customernodes[$idx]['linktype'] = $DB->GetOne('SELECT linktype FROM nodes WHERE id=? AND ', array($row['id']));
foreach ($assignments as $valass){
if (($valass['dateto'] > time() || $valass['dateto'] == 0) && ($valass['datefrom'] < time() || $valass['datefrom'] == 0)){
foreach ($valass['nodes'] as $lit => $valnod) {
if ($valnod['id'] == $row['id']){
$customernodes[$idx]['down'] += floor($valass['downceil']/1024);
$customernodes[$idx]['uplo'] += floor($valass['upceil']/1024);
}
}
}
}
}