Mercurial > hg > ywww
view php/read/getBrowseNodes.php @ 53:dd93cb4b77ad
more debugging (too much for production), fallback to DB if getBookDetails is knocked back by Amazon
author | Charlie Root |
---|---|
date | Thu, 06 Jun 2019 16:37:20 -0400 |
parents | a67bf725e87b |
children |
line wrap: on
line source
<?PHP include "db.php"; $query = "CALL b_getBrowseNodes()"; $results = mysqli_query($link, $query) or exit( mysqli_error( $link )); $output = ""; $output .= "<?xml version=\"1.0\"?>"; $output .= "<BrowseNodeKey>"; while($line = mysqli_fetch_assoc($results)) { $output .= "<Node>"; $output .= "<Key>" . htmlspecialchars(trim($line["BrowseNodeID"])) . "</Key>"; $output .= "<Value>" . htmlspecialchars(trim($line["BrowseNodeValue"])) . "</Value>"; $output .= "</Node>"; } $output .= "</BrowseNodeKey>"; echo $output; mysqli_close($link); ?>