diff --git a/src/Controller/MainController.php b/src/Controller/MainController.php index ca4b418..b5376e7 100644 --- a/src/Controller/MainController.php +++ b/src/Controller/MainController.php @@ -327,7 +327,7 @@ class MainController extends AppController { $page = intval($this->request->query('page')); $conn = ConnectionManager::get('default'); - $stmt = $conn->execute('SELECT COUNT(id) AS Total FROM block'); + $stmt = $conn->execute('SELECT height AS Total FROM block oder by id desc limit 1'); $count = $stmt->fetch(\PDO::FETCH_OBJ); $numBlocks = $count->Total;