Changeset 409 for trunk/finance/spotreba.php
- Timestamp:
- Oct 4, 2012, 9:01:28 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/finance/spotreba.php
r408 r409 15 15 $CelkovaSpotreba = 0; 16 16 $DbResult = $this->Database->query("SELECT * FROM NetworkSegment"); 17 while($ Row= $DbResult->fetch_array())17 while($Segment = $DbResult->fetch_array()) 18 18 { 19 $DbResult2 = $this->Database->query("SELECT SUM( consumption) FROM network_devices WHERE Segment=".$Row['Id']." AND Used=1");19 $DbResult2 = $this->Database->query("SELECT SUM(Consumption) FROM Product WHERE Segment=".$Segment['Id']." AND Used=1"); 20 20 $Row2 = $DbResult2->fetch_array(); 21 21 $CelkovaSpotreba = $CelkovaSpotreba + $Row2[0];
Note:
See TracChangeset
for help on using the changeset viewer.