From b85d16b5d59f433ede98b8fbc2f5064fb3bde30a Mon Sep 17 00:00:00 2001 From: mauirixxx Date: Tue, 23 May 2017 23:09:06 -1000 Subject: [PATCH] should list actual material name now --- gw-pull.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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) { } ?>
-
+
\ No newline at end of file