diff --git a/gw-pull.php b/gw-pull.php
index ea4a291..0708f4f 100644
--- a/gw-pull.php
+++ b/gw-pull.php
@@ -53,7 +53,14 @@ if (mysqli_num_rows($result) > 0) {
echo ' named ' . $row['itemname'];
} else {
//need to insert material linking code here
- echo 'a ' . $row['material'];
+ $matid = $row['materialid'];
+ $sqlmat = "SELECT material FROM materials WHERE materialid = $matid";
+ if (!$resultmats = $con->query($sqlmat)){
+ die ('There was an error running the query [' . $con->error . ']');
+ }
+ while ($row6 = $resultmats->fetch_array()){
+ echo 'a ' . $row6['material'];
+ }
}
}
echo ' at ' . $row['location'] . '
';
@@ -63,5 +70,5 @@ if (mysqli_num_rows($result) > 0) {
}
?>
-