prepare($sql); $sth->execute([$subnet_id]); $smarty->assign("subnet", $sth->fetch(PDO::FETCH_OBJ)); // node $sql = "SELECT node_id AS id, node_ip AS ip FROM node WHERE subnet_id=? ORDER BY INET_ATON(node_ip)"; $sth = $dbh->prepare($sql); $sth->execute([$subnet_id]); $smarty->assign("nodes", $sth->fetchAll()); $smarty->display("subnetdel.tpl"); include("footer.php"); ?>