From 7869fc9e76f7909e30a6ed4edeaef7ce8d131e8e Mon Sep 17 00:00:00 2001 From: mauirixxx Date: Thu, 18 May 2017 11:11:15 -1000 Subject: [PATCH] doing treasure location code --- gw-pull.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gw-pull.php b/gw-pull.php index 8d61dbc..7a795d2 100644 --- a/gw-pull.php +++ b/gw-pull.php @@ -5,7 +5,8 @@ $cnameid = mysqli_real_escape_string($con, $_GET['toonid']); //need to sanitize if ($con->connect_errno > 0){ die ('Unable to connect to database [' . $db->connect_errno . ']'); } -$sql = "SELECT * FROM `history` WHERE `charname` = '$cnameid' ORDER BY `historydate` ASC"; +#$sql = "SELECT * FROM `history` WHERE `charname` = '$cnameid' ORDER BY `historydate` ASC"; //old sql statement that works currently +$sql = "SELECT history.*, treasurelocation.* FROM history LEFT OUTER JOIN treasurelocation ON history.`locationid` = treasurelocation.`treasureid` WHERE history.`charname` = '$cnameid' ORDER BY `historydate` ASC"; if (!$result = $con->query($sql)){ die ('There was an error running the query [' . $con->error . ']'); }