Changeset 796 for trunk/Modules/Map/Map.php
- Timestamp:
- Feb 4, 2016, 5:03:08 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Map/Map.php
r745 r796 22 22 function ShowPosition() 23 23 { 24 $DbResult = $this->Database->select('MapPosition', '*', ' Id='.$_GET['i']);24 $DbResult = $this->Database->select('MapPosition', '*', '`Id`='.$_GET['i']); 25 25 if($DbResult->num_rows > 0) 26 26 { … … 51 51 function initialize() 52 52 { 53 53 54 if (GBrowserIsCompatible()) 54 55 { … … 88 89 { 89 90 NetworkLinks = ['; 90 $DbResult = $this->Database->query('SELECT * FROM NetworkLink WHERE Interface1 <> 0 AND Interface2 <> 0');91 $DbResult = $this->Database->query('SELECT * FROM `NetworkLink` WHERE (`Interface1` <> 0) AND (`Interface2` <> 0)'); 91 92 while($Link = $DbResult->fetch_assoc()) 92 93 { 93 $DbResult2 = $this->Database->query('SELECT NetworkDevice.Used, MapPosition.Pos FROM NetworkDevice'.94 'JOIN MapPosition ON MapPosition.Id = NetworkDevice.MapPosition'.95 'WHERE NetworkDevice.Id = (SELECT NetworkInterface.Device FROM NetworkInterface WHERE NetworkInterface.Id= '.$Link['Interface1'].')');96 $DbResult3 = $this->Database->query('SELECT NetworkDevice.Used, MapPosition.Pos FROM NetworkDevice'.97 'JOIN MapPosition ON MapPosition.Id = NetworkDevice.MapPosition'.98 'WHERE NetworkDevice.Id = (SELECT NetworkInterface.Device FROM NetworkInterface WHERE NetworkInterface.Id= '.$Link['Interface2'].')');94 $DbResult2 = $this->Database->query('SELECT `NetworkDevice`.`Used`, `MapPosition`.`Pos` FROM `NetworkDevice` '. 95 'JOIN `MapPosition` ON `MapPosition`.`Id` = `NetworkDevice`.`MapPosition` '. 96 'WHERE `NetworkDevice`.`Id` = (SELECT `NetworkInterface`.`Device` FROM `NetworkInterface` WHERE `NetworkInterface`.`Id` = '.$Link['Interface1'].')'); 97 $DbResult3 = $this->Database->query('SELECT `NetworkDevice`.`Used`, `MapPosition`.`Pos` FROM `NetworkDevice` '. 98 'JOIN `MapPosition` ON `MapPosition`.`Id` = `NetworkDevice`.`MapPosition` '. 99 'WHERE `NetworkDevice`.`Id` = (SELECT `NetworkInterface`.`Device` FROM `NetworkInterface` WHERE `NetworkInterface`.`Id` = '.$Link['Interface2'].')'); 99 100 if(($DbResult2->num_rows > 0) and ($DbResult3->num_rows > 0)) 100 101 { … … 136 137 NetworkDevices = ['; 137 138 138 $DbResult = $this->Database->query('SELECT GROUP_CONCAT( NetworkDevice.Name SEPARATOR ",") AS Name, '.139 ' MapPosition.Pos AS Pos, MapPosition.Name AS NodeName'.140 'FROM NetworkDevice LEFT JOIN MapPosition ON MapPosition.Id = NetworkDevice.MapPosition'.141 'WHERE ( NetworkDevice.Used=1) AND (NetworkDevice.MapPositionIS NOT NULL) '.142 'GROUP BY NetworkDevice.MapPosition');139 $DbResult = $this->Database->query('SELECT GROUP_CONCAT(`NetworkDevice`.`Name` SEPARATOR ",") AS `Name`, '. 140 '`MapPosition`.`Pos` AS `Pos`, `MapPosition`.`Name` AS `NodeName` '. 141 'FROM `NetworkDevice` LEFT JOIN `MapPosition` ON `MapPosition`.`Id` = `NetworkDevice`.`MapPosition` '. 142 'WHERE (`NetworkDevice`.`Used`=1) AND (`NetworkDevice`.`MapPosition` IS NOT NULL) '. 143 'GROUP BY `NetworkDevice`.`MapPosition`'); 143 144 while($Device = $DbResult->fetch_assoc()) 144 145 {
Note:
See TracChangeset
for help on using the changeset viewer.