prepare("SELECT asset_name FROM asset WHERE asset_id=?"); $sth->execute([$asset_id]); $smarty->assign("asset_id", $asset_id); $smarty->assign("asset_name", $sth->fetchColumn()); // nodes to delete $sql = "SELECT node_id, node_ip FROM node WHERE asset_id=? ORDER BY INET_ATON(node_ip)"; $sth = $dbh->prepare($sql); $sth->execute([$asset_id]); $smarty->assign("nodes", $sth->fetchAll(PDO::FETCH_ASSOC)); $smarty->display("assetdel.tpl"); include("footer.php"); ?>