Mercurial > hg > ywww
diff php/read/getBrowseNodes.php @ 6:077b0a0a3e6d
remaining originals according to dependency walk
author | Robert Boland <robert@markup.co.uk> |
---|---|
date | Thu, 16 Feb 2017 22:29:02 +0000 |
parents | |
children | 385ddd7c4b55 a67bf725e87b |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/php/read/getBrowseNodes.php Thu Feb 16 22:29:02 2017 +0000 @@ -0,0 +1,27 @@ +<?PHP + +include "../../../private/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); + + +?> \ No newline at end of file