Selaa lähdekoodia

doing treasure location code

development
mauirixxx 8 vuotta sitten
vanhempi
commit
7869fc9e76
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. +2
    -1
      gw-pull.php

+ 2
- 1
gw-pull.php Näytä tiedosto

@@ -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 . ']');
}


Ladataan…
Peruuta
Tallenna