diff --git a/GameEngine/Database.php b/GameEngine/Database.php index 013ca07b..78b9ade1 100755 --- a/GameEngine/Database.php +++ b/GameEngine/Database.php @@ -4309,10 +4309,10 @@ References: User ID/Message ID, Mode } // no need to cache this method - function getTradeRoute($uid) { - list($uid) = $this->escape_input((int) $uid); + function getTradeRoute($from) { + list($from) = $this->escape_input((int) $from); - $q = "SELECT * FROM " . TB_PREFIX . "route where uid = $uid ORDER BY timestamp ASC"; + $q = "SELECT * FROM " . TB_PREFIX . "route where `from` = $from ORDER BY timestamp ASC"; $result = mysqli_query($this->dblink,$q); return $this->mysqli_fetch_all($result); } diff --git a/Templates/Build/17_4.tpl b/Templates/Build/17_4.tpl index 7dabaf9e..ee840e38 100644 --- a/Templates/Build/17_4.tpl +++ b/Templates/Build/17_4.tpl @@ -19,7 +19,7 @@ include("17_edit.tpl"); ?>

Gold2.

-
+ @@ -30,8 +30,8 @@ include("17_edit.tpl"); getTradeRoute($session->uid); - if(count($routes) == 0) { +$routes = $database->getTradeRoute($village->wid); + if(empty($routes)) { echo ""; }else{ foreach($routes as $route){
".NO_TRADE_ROUTES.".