SQL Statements simplified and some bugfixing
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user