Ignore:
Timestamp:
Jul 15, 2011, 8:26:28 AM (13 years ago)
Author:
george
Message:
  • Uvozovky v názvech v SQL dotazech.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/system/generators/firewall_nat.php

    r315 r317  
    3636//$Items[] = array('chain' => 'inet-in', 'dst-address' => '172.16.1.1/30', 'action' => 'accept', 'comment' => 'Local_subnet');
    3737
    38 $DbResult = $Database->query('SELECT Member.*, Subject.Name FROM Member JOIN Subject ON Member.Subject = Subject.Id');
     38$DbResult = $Database->query('SELECT `Member`.*, `Subject`.`Name` FROM `Member` JOIN `Subject` ON `Member`.`Subject` = `Subject`.`Id`');
    3939while($Member = $DbResult->fetch_assoc())
    4040{
    4141  echo($Member['Name'].': ');
    4242  // Hosts
    43   $DbResult2 = $Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName, NetworkDevice.InboundNATPriority FROM NetworkInterface LEFT JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE (NetworkInterface.ExternalIP <> "") AND (NetworkDevice.Member = '.$Member['Id'].') AND (NetworkInterface.LocalIP != NetworkInterface.ExternalIP) ORDER BY id DESC');
     43  $DbResult2 = $Database->query('SELECT `NetworkInterface`.*, `NetworkDevice`.`Name` AS `DeviceName`, `NetworkDevice`.`InboundNATPriority` FROM `NetworkInterface`'.
     44  ' LEFT JOIN `NetworkDevice` ON `NetworkDevice`.`Id` = `NetworkInterface`.`Device` WHERE (`NetworkInterface`.`ExternalIP` <> "")'.
     45  ' AND (`NetworkDevice`.`Member` = '.$Member['Id'].') AND (`NetworkInterface`.`LocalIP` != `NetworkInterface`.`ExternalIP`) ORDER BY `id` DESC');
    4446  while($Interface = $DbResult2->fetch_assoc())
    4547  {
     
    6062
    6163  // Subnets
    62   $DbResult2 = $Database->select('NetworkSubnet', '*', 'Member='.$Member['Id']);
     64  $DbResult2 = $Database->select('NetworkSubnet', '*', '`Member`='.$Member['Id']);
    6365  while($Subnet = $DbResult2->fetch_assoc())
    6466  {   
Note: See TracChangeset for help on using the changeset viewer.