W dniu 2012-06-04 21:06, Szymon Kajewski pisze:A ładniej :
SELECT sum(`cash`.`value`) FROM cash , macs, nodes where `macs`.`nodeid` = `nodes`.`id` AND `nodes`.`ownerid` = `cash`.`customerid` and `macs`.`mac` = '00:04:23:1a:74:58'
SELECT sum(cash.`value`) FROM macs INNER JOIN nodes ON macs.nodeid = nodes.id INNER JOIN cash ON nodes.ownerid = cash.customerid WHERE macs.mac =UPPER('00:04:23:1A:74:58')