Ignore:
Timestamp:
Oct 4, 2012, 9:01:28 AM (12 years ago)
Author:
chronos
Message:
  • Upraveno: Přejmenovaná tabulka network_device a hosts_topology.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/finance/spotreba.php

    r408 r409  
    1515    $CelkovaSpotreba = 0;
    1616    $DbResult = $this->Database->query("SELECT * FROM NetworkSegment");
    17     while($Row = $DbResult->fetch_array())
     17    while($Segment = $DbResult->fetch_array())
    1818    {
    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");
    2020      $Row2 = $DbResult2->fetch_array();
    2121      $CelkovaSpotreba = $CelkovaSpotreba + $Row2[0];
Note: See TracChangeset for help on using the changeset viewer.