SQL Statements simplified and some bugfixing

This commit is contained in:
2023-02-15 12:44:29 +01:00
parent ed33c0553d
commit 6df7a3f6a8
38 changed files with 694 additions and 678 deletions

View File

@@ -85,18 +85,16 @@
// setup subnets
// build query
$query = "SELECT
subnet.subnet_id AS subnet_id,
subnet.subnet_address AS subnet_address,
subnet.subnet_mask AS subnet_mask
s.subnet_id,
s.subnet_address,
s.subnet_mask
FROM
subnet,
subnetlocation
subnet AS s LEFT JOIN subnetlocation USING (subnet_id)
WHERE
subnetlocation.location_id=" . $location_id . "
AND subnetlocation.subnet_id=subnet.subnet_id
ORDER BY
INET_ATON(subnet.subnet_address)";
INET_ATON(s.subnet_address)";
// run query
$subnets = $db->db_select($query);
$smarty->assign("subnets", $subnets);