From 52570011532be12aee42dc02628dc8d33e958bd3 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Fri, 6 Sep 2013 14:55:44 +0200 Subject: [PATCH] fixing blockhash in round block details --- public/include/classes/roundstats.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/include/classes/roundstats.class.php b/public/include/classes/roundstats.class.php index d93cca43..8af22cbf 100644 --- a/public/include/classes/roundstats.class.php +++ b/public/include/classes/roundstats.class.php @@ -31,10 +31,10 @@ class RoundStats { **/ public function getNextBlock($iHeight=0) { $stmt = $this->mysqli->prepare(" - SELECT height + SELECT height FROM $this->tableBlocks WHERE height > ? - ORDER BY height ASC + ORDER BY height ASC LIMIT 1"); if ($this->checkStmt($stmt) && $stmt->bind_param('i', $iHeight) && $stmt->execute() && $result = $stmt->get_result()) return $result->fetch_object()->height; @@ -46,10 +46,10 @@ class RoundStats { **/ public function getPreviousBlock($iHeight=0) { $stmt = $this->mysqli->prepare(" - SELECT height + SELECT height FROM $this->tableBlocks WHERE height < ? - ORDER BY height DESC + ORDER BY height DESC LIMIT 1"); if ($this->checkStmt($stmt) && $stmt->bind_param('i', $iHeight) && $stmt->execute() && $result = $stmt->get_result()) return $result->fetch_object()->height; @@ -64,7 +64,7 @@ class RoundStats { public function getDetailsForBlockHeight($iHeight=0, $isAdmin=0) { $stmt = $this->mysqli->prepare(" SELECT - b.id, height, amount, confirmations, difficulty, FROM_UNIXTIME(time) as time, shares, + b.id, height, blockhash, amount, confirmations, difficulty, FROM_UNIXTIME(time) as time, shares, IF(a.is_anonymous, IF( ? , a.username, 'anonymous'), a.username) AS finder FROM $this->tableBlocks as b LEFT JOIN $this->tableUsers AS a ON b.account_id = a.id