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

@@ -36,12 +36,12 @@
// setup subnet
// build query
$query = "SELECT
subnet.subnet_address AS subnet_address,
subnet.subnet_mask AS subnet_mask
subnet_address,
subnet_mask
FROM
subnet
WHERE
subnet.subnet_id=" . $subnet_id;
subnet_id=" . $subnet_id;
// run query
$subnet = $db->db_select($query);
@@ -54,15 +54,15 @@
// setup node
// build query
$query = "SELECT
node.node_id AS node_id,
node.node_ip AS node_ip
node_id,
node_ip
FROM
node
WHERE
node.subnet_id=" . $subnet_id . "
subnet_id=" . $subnet_id . "
ORDER BY
INET_ATON(node.node_ip)";
INET_ATON(node_ip)";
// run query
$nodes = $db->db_select($query);
$smarty->assign("nodes", $nodes);