diff --git a/gw-connect-sample.php b/gw-connect-sample.php new file mode 100644 index 0000000..0b480c0 --- /dev/null +++ b/gw-connect-sample.php @@ -0,0 +1,6 @@ + diff --git a/gw-index.php b/gw-index.php new file mode 100644 index 0000000..e59b80c --- /dev/null +++ b/gw-index.php @@ -0,0 +1,8 @@ +connect_errno > 0){ + die ('Unable to connect to database [' . $db->connect_errno . ']'); +} +?> diff --git a/gw-pull.php b/gw-pull.php new file mode 100644 index 0000000..39a78b7 --- /dev/null +++ b/gw-pull.php @@ -0,0 +1,22 @@ +connect_errno > 0){ + die ('Unable to connect to database [' . $db->connect_errno . ']'); +} +$sql = "SELECT * FROM `history` WHERE `charname` = '$cname' ORDER BY `historydate` ASC"; +if (!$result = $con->query($sql)){ + die ('There was an error running the query [' . $con->error . ']'); +} +while ($row = $result->fetch_array()){ + echo 'On ' . $row['historydate'] . ', "' . $row['charname'] . '" got ' . $row['goldrec'] . 'GP and '; + if (is_null($row['material'])) { + echo 'a ' . $row['itemrarity'] . ' req' . $row['itemreq'] . ' ' . $row['itemattribute'] . ' ' . $row['itemtype'] . ' named something stupid
'; + } else { + echo 'a ' . $row['material'] . '!
'; + } //add another else statement to cover RUNES here +} +?> + +Treasure Dates