prepare($sql); $sth->execute([$asset_id]); $asset = $sth->fetch(PDO::FETCH_OBJ); $smarty->assign("asset", $asset); $sql = "SELECT node_id, node_ip, LEFT(node_info, 40) as node_info 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("assetview.tpl"); include("footer.php"); ?>